]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
uuidd: fix compiler warnings [-Wsign-compare]
authorKarel Zak <kzak@redhat.com>
Mon, 1 Aug 2011 10:32:18 +0000 (12:32 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 1 Aug 2011 10:32:18 +0000 (12:32 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/uuidd.c

index 3d130af3ffa4257ccae963cd0a7b94907b400a21..93cb17441371e3d6098c6ba37623f49eabd58d26 100644 (file)
@@ -117,7 +117,7 @@ static void terminate_intr(int signo CODE_ATTR((unused)))
 }
 
 static int call_daemon(const char *socket_path, int op, char *buf,
-                      int buflen, int *num, const char **err_context)
+                      size_t buflen, int *num, const char **err_context)
 {
        char op_buf[8];
        int op_len;
@@ -179,7 +179,7 @@ static int call_daemon(const char *socket_path, int op, char *buf,
                close(s);
                return -1;
        }
-       if (reply_len < 0 || reply_len > buflen) {
+       if (reply_len < 0 || (size_t) reply_len > buflen) {
                if (err_context)
                        *err_context = _("bad response length");
                close(s);