projects
/
qemu-gpiodev
/
libgpiod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfd2899
)
tests: add a missing assertion
author
Bartosz Golaszewski
<bartekgola@gmail.com>
Fri, 9 Jun 2017 15:34:05 +0000
(17:34 +0200)
committer
Bartosz Golaszewski
<bartekgola@gmail.com>
Fri, 9 Jun 2017 15:34:05 +0000
(17:34 +0200)
asprintf() can fail. Check its return value.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
tests/tests-gpioinfo.c
patch
|
blob
|
history
diff --git
a/tests/tests-gpioinfo.c
b/tests/tests-gpioinfo.c
index 5264b614fd393604d245e8d80c23e47990d41f0b..fc7c9408a6af75a992971de0fe9a8499c342d2dc 100644
(file)
--- a/
tests/tests-gpioinfo.c
+++ b/
tests/tests-gpioinfo.c
@@
-41,6
+41,7
@@
static void gpioinfo_one_exported(void)
rv = asprintf(&ptrn,
"\\s+line\\s+7:\\s+unnamed\\s+\\\"%s\\\"\\s+input\\s+active-low",
TEST_CONSUMER);
+ TEST_ASSERT(rv > 0);
chip = gpiod_chip_open(test_chip_path(1));
TEST_ASSERT_NOT_NULL(chip);