[Git][NTPsec/ntpsec][master] 3 commits: Fix warning about undefined variable when building with lockclock and kernel PLL

Eric S. Raymond gitlab at mg.gitlab.com
Tue Oct 4 17:49:14 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
aaaa72f9 by Matt Selsky at 2016-10-04T11:39:07-04:00
Fix warning about undefined variable when building with lockclock and kernel PLL

Related to Gitlab issue #34

- - - - -
187d148f by Matt Selsky at 2016-10-04T11:40:51-04:00
PEP8: E711 comparison to None should be 'if cond is not None:'

- - - - -
661b8af3 by Matt Selsky at 2016-10-04T11:40:51-04:00
Typo

- - - - -


3 changed files:

- ntpd/ntp_loopfilter.c
- ntpstats/ntpviz
- wafhelpers/options.py


Changes:

=====================================
ntpd/ntp_loopfilter.c
=====================================
--- a/ntpd/ntp_loopfilter.c
+++ b/ntpd/ntp_loopfilter.c
@@ -119,8 +119,10 @@ double	drift_comp;		/* frequency (s/s) */
 static double init_drift_comp; /* initial frequency (PPM) */
 double	clock_stability;	/* frequency stability (wander) (s/s) */
 u_int	sys_tai;		/* TAI offset from UTC */
-#ifndef ENABLE_LOCKCLOCK
+#if !defined(ENABLE_LOCKCLOCK) || defined(HAVE_KERNEL_PLL)
 static bool loop_started;	/* true after LOOP_DRIFTINIT */
+#endif /* !ENABLE_LOCKCLOCK || HAVE_KERNEL_PLL */
+#ifndef ENABLE_LOCKCLOCK
 static void rstclock (int, double); /* transition function */
 static double direct_freq(double); /* direct set frequency */
 static void set_freq(double);	/* set frequency */


=====================================
ntpstats/ntpviz
=====================================
--- a/ntpstats/ntpviz
+++ b/ntpstats/ntpviz
@@ -936,9 +936,9 @@ Python by ESR, concept and GNUPLOT code by Dan Drown.
     args = parser.parse_args()
 
     args.period = int( float(args.period) * NTPStats.SecondsInDay)
-    if None != args.endtime:
+    if args.endtime is not None:
         args.endtime = iso_to_posix(args.endtime)
-    if None != args.starttime:
+    if args.starttime is not None:
         args.starttime = iso_to_posix(args.starttime)
 
     args.statsdirs = [os.path.expanduser(path)
@@ -1034,13 +1034,13 @@ Python by ESR, concept and GNUPLOT code by Dan Drown.
                 sys.stdout.write(plot['plot'])
             raise SystemExit(0)
 
-        if None != args.show_peer_offsets or None != args.show_peer_jitters:
+        if args.show_peer_offsets is not None or args.show_peer_jitters is not None:
             if not len( stats.peerstats ):
                 sys.stderr.write("ntpviz: ERROR:  missing peerstats data\n")
                 raise SystemExit(1)
-            if None != args.show_peer_offsets:
+            if args.show_peer_offsets is not None:
                 plot = stats.peer_offsets_gnuplot(args.show_peer_offsets)
-            if None != show_peer_jitters:
+            if show_peer_jitters is not None:
                 plot = stats.peer_jitters_gnuplot(args.show_peer_jitters)
             if args.generate:
                 gnuplot(plot['plot'])


=====================================
wafhelpers/options.py
=====================================
--- a/wafhelpers/options.py
+++ b/wafhelpers/options.py
@@ -29,7 +29,7 @@ def options_cmd(ctx, config):
 
 	grp = ctx.add_option_group("NTP configure features")
 	grp.add_option('--enable-leap-smear', action='store_true', default=False, help="Enable Leap Smearing.")
-	grp.add_option('--enable-mssntp', action='store_true', default=False, help="Enable Samba MSS NTP support.")
+	grp.add_option('--enable-mssntp', action='store_true', default=False, help="Enable Samba MS SNTP support.")
 	grp.add_option('--enable-lockclock', action='store_true', default=False, help="Enable NIST lockclock scheme.")
 
 	grp = ctx.add_option_group("Refclock configure options")



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/875477d156fee62f672068397237fb85d2f59af3...661b8af3446612a3867d0ee441179f849e453770
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161004/ae01ac06/attachment.html>


More information about the vc mailing list