chiark / gitweb /
systemctl: show a colored red dot in "status" output indicating the state of a unit
[elogind.git] / src / test / test-libudev.c
index 7ed4e14701607a7a43e61f7931b4ead2b7a13e1d..c233b1ea1d9ed80844b7fd5e7f6a3f7fecefb370 100644 (file)
@@ -34,6 +34,7 @@
 
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 
+_printf_(6,0)
 static void log_fn(struct udev *udev,
                    int priority, const char *file, int line, const char *fn,
                    const char *format, va_list args) {
@@ -252,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) {
@@ -260,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) {