]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
uuidd: fix compiler warning [-Wsign-compare]
authorKarel Zak <kzak@redhat.com>
Fri, 9 Oct 2015 09:23:16 +0000 (11:23 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 9 Oct 2015 09:23:16 +0000 (11:23 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/uuidd.c

index 2359f986fd8d7e8c82dd7db0c53abae0a6e4687a..dc62731b1858c85381f899ec3704810bce74717d 100644 (file)
@@ -413,7 +413,9 @@ static void server_loop(const char *socket_path, const char *pidfile_path,
        pfd[POLLFD_SIGNAL].events = pfd[POLLFD_SOCKET].events = POLLIN | POLLERR | POLLHUP;
 
        while (1) {
-               ret = poll(pfd, ARRAY_SIZE(pfd), (uuidd_cxt->timeout == 0 ? -1 : uuidd_cxt->timeout * 1000));
+               ret = poll(pfd, ARRAY_SIZE(pfd),
+                               uuidd_cxt->timeout ?
+                                       (int) uuidd_cxt->timeout * 1000 : -1);
                if (ret < 0) {
                        if (errno == EAGAIN)
                                continue;