projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
121b5e5
)
tools:iio:lsiio: add closedir before exit
author
Hartmut Knaack
<knaack.h@gmx.de>
Sun, 31 May 2015 12:39:47 +0000
(14:39 +0200)
committer
Jonathan Cameron
<jic23@kernel.org>
Sun, 31 May 2015 16:30:29 +0000
(17:30 +0100)
In dump_channels() the DIR *dp was left open on exit. Close it and check
for errors.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
tools/iio/lsiio.c
patch
|
blob
|
history
diff --git
a/tools/iio/lsiio.c
b/tools/iio/lsiio.c
index c585440f864e365d015d6701601b9fd0ce2b3176..65a2385e2a784e8ba1262e6a2bb1b04f537d1fb7 100644
(file)
--- a/
tools/iio/lsiio.c
+++ b/
tools/iio/lsiio.c
@@
-56,7
+56,7
@@
static int dump_channels(const char *dev_dir_name)
printf(" %-10s\n", ent->d_name);
}
- return 0;
+ return
(closedir(dp) == -1) ? -errno :
0;
}
static int dump_one_device(const char *dev_dir_name)