From: Dave Hart Date: Sat, 18 Dec 2010 03:22:45 +0000 (+0000) Subject: Log listening address as addr:port. X-Git-Tag: NTP_4_2_7P96~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65d9f0305df84f1434c6e49e55db4a35bc032d4e;p=thirdparty%2Fntp.git Log listening address as addr:port. remove assoc_number < 0 check now that it is unsigned. bk: 4d0c2905GJ_yQx4dV8BRvrukqF6Ceg --- diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index ac54f3c40..31a566e2c 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -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)); } diff --git a/ntpq/libntpq.c b/ntpq/libntpq.c index 27a15dc4b..3322ed232 100644 --- a/ntpq/libntpq.c +++ b/ntpq/libntpq.c @@ -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(