From: Sami Kerola Date: Sat, 24 May 2014 17:49:53 +0000 (+0100) Subject: uuidd: do not mix signed type and unsigned code X-Git-Tag: v2.25-rc1~88^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d8bb8a033fed68b75c9367f9e7fbf97a305995e9;p=thirdparty%2Futil-linux.git uuidd: do not mix signed type and unsigned code Both the strtou32_or_err() and alarm() expect timeout to be unsigned. Signed-off-by: Sami Kerola --- diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c index f72c45281e..8909b5178c 100644 --- a/misc-utils/uuidd.c +++ b/misc-utils/uuidd.c @@ -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);