summaryrefslogtreecommitdiff
path: root/src/test/test-libudev.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/test/test-libudev.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/test/test-libudev.c')
-rw-r--r--src/test/test-libudev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c
index a8c1ff012a..c233b1ea1d 100644
--- a/src/test/test-libudev.c
+++ b/src/test/test-libudev.c
@@ -253,7 +253,7 @@ static int test_monitor(struct udev *udev) {
goto out;
}
- memset(&ep_udev, 0, sizeof(struct epoll_event));
+ memzero(&ep_udev, sizeof(struct epoll_event));
ep_udev.events = EPOLLIN;
ep_udev.data.fd = fd_udev;
if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_udev, &ep_udev) < 0) {
@@ -261,7 +261,7 @@ static int test_monitor(struct udev *udev) {
goto out;
}
- memset(&ep_stdin, 0, sizeof(struct epoll_event));
+ memzero(&ep_stdin, sizeof(struct epoll_event));
ep_stdin.events = EPOLLIN;
ep_stdin.data.fd = STDIN_FILENO;
if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, STDIN_FILENO, &ep_stdin) < 0) {