X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fudev%2Fudev-ctrl.c;h=74bbd3a99eade7b908ed3524125a7f3efee7124a;hb=a71fe8b8aee1cb78c4d8c56eeb234743f64e4b4d;hp=263342335260f3d00ffec159e24d01e501c844b5;hpb=955d98c9c1104d469c2989dbfb58f58ee6fe9bdc;p=elogind.git diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c index 263342335..74bbd3a99 100644 --- a/src/udev/udev-ctrl.c +++ b/src/udev/udev-ctrl.c @@ -180,7 +180,7 @@ int udev_ctrl_get_fd(struct udev_ctrl *uctrl) struct udev_ctrl_connection *udev_ctrl_get_connection(struct udev_ctrl *uctrl) { struct udev_ctrl_connection *conn; - struct ucred ucred; + struct ucred ucred = {}; const int on = 1; int r; @@ -275,7 +275,7 @@ static int ctrl_send(struct udev_ctrl *uctrl, enum udev_ctrl_msg_type type, int pfd[0].fd = uctrl->sock; pfd[0].events = POLLIN; - r = poll(pfd, 1, timeout * 1000); + r = poll(pfd, 1, timeout * MSEC_PER_SEC); if (r < 0) { if (errno == EINTR) continue;