Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ntp/dist/sntp fix DEBUG compilation



details:   https://anonhg.NetBSD.org/src/rev/19f9020d62a6
branches:  trunk
changeset: 757418:19f9020d62a6
user:      kardel <kardel%NetBSD.org@localhost>
date:      Sat Aug 28 15:39:25 2010 +0000

description:
fix DEBUG compilation

diffstat:

 external/bsd/ntp/dist/sntp/networking.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 220307a77c25 -r 19f9020d62a6 external/bsd/ntp/dist/sntp/networking.c
--- a/external/bsd/ntp/dist/sntp/networking.c   Sat Aug 28 15:38:55 2010 +0000
+++ b/external/bsd/ntp/dist/sntp/networking.c   Sat Aug 28 15:39:25 2010 +0000
@@ -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;
        }



Home | Main Index | Thread Index | Old Index