chiark / gitweb /
net-util: match on the driver as exposed by ethtool if DRIVER not set
[elogind.git] / src / udev / udevadm-monitor.c
index 94e76da6fd2c0a6073bb27f1df40053f25f4e633..b2f7f6ba4c08baf30d67f248fe651b307a02e6b6 100644 (file)
@@ -158,7 +158,7 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[])
 
         fd_ep = epoll_create1(EPOLL_CLOEXEC);
         if (fd_ep < 0) {
-                log_error("error creating epoll fd: %m\n");
+                log_error("error creating epoll fd: %m");
                 return 1;
         }
 
@@ -194,11 +194,11 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[])
                         return 2;
                 }
 
-                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) {
-                        log_error("fail to add fd to epoll: %m\n");
+                        log_error("fail to add fd to epoll: %m");
                         return 2;
                 }
 
@@ -228,11 +228,11 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[])
                         return 4;
                 }
 
-                memset(&ep_kernel, 0, sizeof(struct epoll_event));
+                memzero(&ep_kernel, sizeof(struct epoll_event));
                 ep_kernel.events = EPOLLIN;
                 ep_kernel.data.fd = fd_kernel;
                 if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_kernel, &ep_kernel) < 0) {
-                        log_error("fail to add fd to epoll: %m\n");
+                        log_error("fail to add fd to epoll: %m");
                         return 5;
                 }