From 29804cc1e0f37ee34301530fd7f1eb8550be464e Mon Sep 17 00:00:00 2001 From: Greg KH Date: Fri, 31 Jan 2014 06:51:32 +0100 Subject: 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). --- src/test/test-libudev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test') 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) { -- cgit v1.2.3-54-g00ecf