uuidd: fix compiler warnings [-Wsign-compare]

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2011-08-01 12:32:18 +02:00
parent 8a929ed7c0
commit c3bfedc3d7
1 changed files with 2 additions and 2 deletions

View 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);