projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff82c36
)
udevd: initialize fds to -1 and close them before exiting
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Wed, 13 Jan 2016 02:02:56 +0000
(21:02 -0500)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Mon, 18 Jan 2016 20:21:28 +0000
(15:21 -0500)
Little change in practice, because the program will exit soon
afterwards, but the standard style of closing all fds is now followed.
Also gets rid of gcc warning about fd_ctrl and fd_uevent being
unitialized.
src/udev/udevd.c
patch
|
blob
|
history
diff --git
a/src/udev/udevd.c
b/src/udev/udevd.c
index
366e7fb
..
8627a81
100644
(file)
--- a/
src/udev/udevd.c
+++ b/
src/udev/udevd.c
@@
-1652,7
+1652,8
@@
exit:
int main(int argc, char *argv[]) {
_cleanup_free_ char *cgroup = NULL;
- int r, fd_ctrl, fd_uevent;
+ _cleanup_close_ int fd_ctrl = -1, fd_uevent = -1;
+ int r;
log_set_target(LOG_TARGET_AUTO);
log_parse_environment();