Module Name:    src
Committed By:   kardel
Date:           Sat Aug 28 15:39:25 UTC 2010

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

Log Message:
fix DEBUG compilation


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 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/sntp/networking.c
diff -u src/external/bsd/ntp/dist/sntp/networking.c:1.1.1.1 src/external/bsd/ntp/dist/sntp/networking.c:1.2
--- src/external/bsd/ntp/dist/sntp/networking.c:1.1.1.1	Sun Dec 13 16:57:11 2009
+++ src/external/bsd/ntp/dist/sntp/networking.c	Sat Aug 28 15:39:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: networking.c,v 1.1.1.1 2009/12/13 16:57:11 kardel Exp $	*/
+/*	$NetBSD: networking.c,v 1.2 2010/08/28 15:39:25 kardel Exp $	*/
 
 #include "networking.h"
 
@@ -62,6 +62,8 @@
 			free(logmsg);
 		} else {
 #ifdef DEBUG
+			struct addrinfo *dres;
+
 			for (dres = tres[resc]; dres; dres = dres->ai_next) {
 				getnameinfo(dres->ai_addr, dres->ai_addrlen, adr_buf, sizeof(adr_buf), NULL, 0, NI_NUMERICHOST);
 				STDLINE
@@ -160,7 +162,7 @@
 		pkt_output((struct pkt *) rdata, recvc, stdout);
 	}
 	else {
-		saved_errno = errno;
+		int saved_errno = errno;
 		printf("recvfrom error %d (%s)\n", errno, strerror(errno));
 		errno = saved_errno;
 	}

Reply via email to