From: Dave Hart Date: Sat, 18 Dec 2010 03:22:45 +0000 (+0000) Subject: Log listening address as addr:port. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cbed7da230a5ff8e9157488ec87dd37402328c0;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 ac54f3c402..31a566e2c7 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 27a15dc4b5..3322ed232c 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(