[PATCH 4/4] uuidd: do not mix signed type and unsigned code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Both the strtou32_or_err() and alarm() expect timeout to be unsigned.

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 misc-utils/uuidd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c
index 1f4a38b..f728e2e 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);
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux