]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Log listening address as addr:port.
authorDave Hart <hart@ntp.org>
Sat, 18 Dec 2010 03:22:45 +0000 (03:22 +0000)
committerDave Hart <hart@ntp.org>
Sat, 18 Dec 2010 03:22:45 +0000 (03:22 +0000)
remove assoc_number < 0 check now that it is unsigned.

bk: 4d0c2905GJ_yQx4dV8BRvrukqF6Ceg

ntpd/ntp_io.c
ntpq/libntpq.c

index ac54f3c402fa357f441879adb8432c13b1cbabfa..31a566e2c7cbae6fdd69c8976745531987d19a85 100644 (file)
@@ -1218,14 +1218,13 @@ log_listen_address(
        endpt * ep
        )
 {
-       msyslog(LOG_INFO, "%s on %d %s %s UDP %d",
+       msyslog(LOG_INFO, "%s on %d %s %s",
                (ep->ignore_packets) 
                    ? "Listen and drop"
                    : "Listen normally",
                ep->ifnum,
                ep->name,
-               stoa(&ep->sin),
-               SRCPORT(&ep->sin));
+               sptoa(&ep->sin));
 }
 
 
index 27a15dc4b500c59fc21601851d7267263896bb4e..3322ed232cb7b1b391775e4bd33df99f56f8f295 100644 (file)
@@ -714,7 +714,7 @@ int ntpq_get_assoc_clocktype ( associd_t assoc_number )
        char value[LENHOSTNAME];
        char resultbuf[1024];
 
-       if ( assoc_number < 0 || assoc_number > numassoc )
+       if ( assoc_number > numassoc )
                return -1;
        if ( peervar_assoc != assoc_cache[assoc_number].assid ) {
                i = ntpq_read_assoc_peervars(