]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
uuidd: do not mix signed type and unsigned code
authorSami Kerola <kerolasa@iki.fi>
Sat, 24 May 2014 17:49:53 +0000 (18:49 +0100)
committerSami Kerola <kerolasa@iki.fi>
Mon, 26 May 2014 15:42:49 +0000 (16:42 +0100)
Both the strtou32_or_err() and alarm() expect timeout to be unsigned.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
misc-utils/uuidd.c

index f72c45281ea13c8757d40a9440e7b62e83a01074..8909b5178c9b0829379cdb399daaa2ef151568cc 100644 (file)
@@ -59,7 +59,7 @@ extern int optind;
 
 /* server loop control structure */
 struct uuidd_cxt_t {
-       int     timeout;
+       uint32_t        timeout;
        unsigned int    debug: 1,
                        quiet: 1,
                        no_fork: 1,
@@ -366,7 +366,7 @@ static void server_loop(const char *socket_path, const char *pidfile_path,
 
        while (1) {
                fromlen = sizeof(from_addr);
-               if (uuidd_cxt->timeout > 0)
+               if (uuidd_cxt->timeout != 0)
                        alarm(uuidd_cxt->timeout);
                ns = accept(s, (struct sockaddr *) &from_addr, &fromlen);
                alarm(0);