Module Name:    src
Committed By:   uebayasi
Date:           Sat Dec 20 08:38:48 UTC 2014

Modified Files:
        src/external/bsd/ntp/dist/ntpd: ntp_control.c
        src/external/bsd/ntp/dist/sntp: networking.c

Log Message:
Fix signed vs unsigned errors.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/dist/ntpd/ntp_control.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/dist/sntp/networking.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/ntpd/ntp_control.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_control.c:1.9 src/external/bsd/ntp/dist/ntpd/ntp_control.c:1.10
--- src/external/bsd/ntp/dist/ntpd/ntp_control.c:1.9	Fri Dec 19 20:43:17 2014
+++ src/external/bsd/ntp/dist/ntpd/ntp_control.c	Sat Dec 20 08:38:47 2014
@@ -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);
 

Index: src/external/bsd/ntp/dist/sntp/networking.c
diff -u src/external/bsd/ntp/dist/sntp/networking.c:1.8 src/external/bsd/ntp/dist/sntp/networking.c:1.9
--- src/external/bsd/ntp/dist/sntp/networking.c:1.8	Fri Dec 19 20:43:18 2014
+++ src/external/bsd/ntp/dist/sntp/networking.c	Sat Dec 20 08:38:47 2014
@@ -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;
 	}

Reply via email to