Fix signed vs unsigned errors.

This commit is contained in:
uebayasi 2014-12-20 08:38:47 +00:00
parent 867e9b4f2b
commit 1104d021af
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ntp_control.c,v 1.9 2014/12/19 20:43:17 christos Exp $ */
/* $NetBSD: ntp_control.c,v 1.10 2014/12/20 08:38:47 uebayasi Exp $ */
/*
* ntp_control.c - respond to mode 6 control messages and send async
@ -1347,7 +1347,7 @@ ctl_putdata(
/*
* Not enough room in this one, flush it out.
*/
currentlen = MIN(dlen, dataend - datapt);
currentlen = MIN(dlen, (unsigned int)(dataend - datapt));
memcpy(datapt, dp, currentlen);

View File

@ -1,4 +1,4 @@
/* $NetBSD: networking.c,v 1.8 2014/12/19 20:43:18 christos Exp $ */
/* $NetBSD: networking.c,v 1.9 2014/12/20 08:38:47 uebayasi Exp $ */
#include <config.h>
#include "networking.h"
@ -82,7 +82,7 @@ skip_efields(
while ((tail - head) > 6) {
nlen = ntohl(*head++) & 0xffff;
nlen = (nlen + 3) >> 2;
if (nlen > (tail - head) || nlen < 4)
if (nlen > (u_int)(tail - head) || nlen < 4)
return NULL; /* Blooper! Inconsistent! */
head += nlen;
}