From: Harlan Stenn Date: Sat, 2 Oct 2010 07:45:18 +0000 (-0400) Subject: Variable name cleanup from Dave Mills X-Git-Tag: NTP_4_2_7P59~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=197e70005f8b919eb7340b4c17bfaa16ba4fc77c;p=thirdparty%2Fntp.git Variable name cleanup from Dave Mills bk: 4ca6e30e0mI4UyUQoageJ61lWv7sWQ --- diff --git a/ChangeLog b/ChangeLog index 2c9eff1e5..dc121f7e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* Variable name cleanup from Dave Mills. * [Bug 1657] darwin needs res_9_init, not res_init. (4.2.7p58) 2010/09/30 Released by Harlan Stenn * Clock select bugfix from Dave Mills. diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index 82355740a..b261c8b34 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -2510,12 +2510,12 @@ clock_select(void) */ j = 0; for (i = 0; i < nlist; i++) { - double d; + double h; peer = peers[i]; - d = root_distance(peer); - if (nlist > 1 && (peer->offset + d < low || - peer->offset - d > high) && !(peer->flags & FLAG_TRUE)) + h = root_distance(peer); + if ((high <= low || peer->offset + h < low || + peer->offset - h > high) && !(peer->flags & FLAG_TRUE)) continue; #ifdef REFCLOCK