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:
a29f20a
)
tests: move the closedir() call
author
Bartosz Golaszewski
<bartekgola@gmail.com>
Thu, 23 Feb 2017 10:51:00 +0000
(11:51 +0100)
committer
Bartosz Golaszewski
<bartekgola@gmail.com>
Thu, 23 Feb 2017 10:51:00 +0000
(11:51 +0100)
Close the directory immediately after the loop iterating over
its entries ends.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
tests/unit/gpiod-unit.c
patch
|
blob
|
history
diff --git
a/tests/unit/gpiod-unit.c
b/tests/unit/gpiod-unit.c
index 51b59455a16f5f328c89fe7a15145d2a2669ceaa..4e0e6ccce96bdb9b5c5a5da76ee1508bb135ad58 100644
(file)
--- a/
tests/unit/gpiod-unit.c
+++ b/
tests/unit/gpiod-unit.c
@@
-379,13
+379,12
@@
static void test_prepare(struct gu_chip_descr *descr)
die("unable to determine the chip number");
}
}
+ closedir(dir);
if (descr->num_chips != current)
die("number of requested and detected mockup gpiochips is not the same");
qsort(ctx->chips, ctx->num_chips, sizeof(*ctx->chips), chipcmp);
-
- closedir(dir);
}
static void test_teardown(void)