[Git][NTPsec/ntpsec][master] Do not user zero as a magic number.

Gary E. Miller gitlab at mg.gitlab.com
Tue Sep 20 22:34:41 UTC 2016


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
c5d48b7d by Gary E. Miller at 2016-09-20T15:32:25-07:00
Do not user zero as a magic number.

minpoll=0 really meant NTP_MINDPOLL
maxpoll=0 really meant NTP_MAXDPOLL

Just set the initial minpoll and maxpoll directly to the desired
value.  This does not yet fix all bad uses of zero as magic number.

- - - - -


1 changed file:

- ntpd/ntp_config.c


Changes:

=====================================
ntpd/ntp_config.c
=====================================
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -2787,8 +2787,8 @@ config_peers(
 	    cmdline_server_count--, cmdline_servers++) {
 		struct peer_ctl client_ctl = {
 		    .version = NTP_VERSION,
-		    .minpoll = 0,
-		    .maxpoll = 0,
+		    .minpoll = NTP_MINDPOLL,
+		    .maxpoll = NTP_MAXDPOLL,
 		    .flags = FLAG_IBURST,
 		    .ttl = 0,
 		    .peerkey = 0,



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/c5d48b7d969fc21eed67ce643555b094597c9cfa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160920/6fc9981c/attachment.html>


More information about the vc mailing list