summaryrefslogtreecommitdiff
path: root/src/udev/udev-event.c
diff options
context:
space:
mode:
authorGreg KH <gregkh@linuxfoundation.org>2014-01-31 06:51:32 +0100
committerTom Gundersen <teg@jklm.no>2014-01-31 11:55:01 +0100
commit29804cc1e0f37ee34301530fd7f1eb8550be464e (patch)
treeba287b984b216279bb342579a9d1039383ca3a39 /src/udev/udev-event.c
parentb5cfa7408c4cb68e9bb232fc34b07fd03c915617 (diff)
use memzero(foo, length); for all memset(foo, 0, length); calls
In trying to track down a stupid linker bug, I noticed a bunch of memset() calls that should be using memzero() to make it more "obvious" that the options are correct (i.e. 0 is not the length, but the data to set). So fix up all current calls to memset(foo, 0, length) to memzero(foo, length).
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r--src/udev/udev-event.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 5aec077043..228232bf79 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -439,7 +439,7 @@ static void spawn_read(struct udev_event *event,
}
if (fd_stdout >= 0) {
- memset(&ep_outpipe, 0, sizeof(struct epoll_event));
+ memzero(&ep_outpipe, sizeof(struct epoll_event));
ep_outpipe.events = EPOLLIN;
ep_outpipe.data.ptr = &fd_stdout;
if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_stdout, &ep_outpipe) < 0) {
@@ -449,7 +449,7 @@ static void spawn_read(struct udev_event *event,
}
if (fd_stderr >= 0) {
- memset(&ep_errpipe, 0, sizeof(struct epoll_event));
+ memzero(&ep_errpipe, sizeof(struct epoll_event));
ep_errpipe.events = EPOLLIN;
ep_errpipe.data.ptr = &fd_stderr;
if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_stderr, &ep_errpipe) < 0) {