[Git][NTPsec/ntpsec][master] 2 commits: cleanup/deglobalize config_priority
    Hal Murray 
    gitlab at mg.gitlab.com
       
    Sun Jan 10 12:34:58 UTC 2016
    
    
  
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
14e0857f by Hal Murray at 2016-01-10T03:08:03Z
cleanup/deglobalize config_priority
- - - - -
72b2d7b9 by Hal Murray at 2016-01-10T04:34:18Z
Fix compiler warnings on 32 bit systems.
- - - - -
4 changed files:
- include/ntpd.h
- ntpd/ntp_config.c
- ntpd/ntp_intercept.c
- ntpd/ntpd.c
Changes:
=====================================
include/ntpd.h
=====================================
--- a/include/ntpd.h
+++ b/include/ntpd.h
@@ -320,7 +320,6 @@ extern	char *	fstostr(time_t);	/* NTP timescale seconds */
 /* ntp_config.c */
 extern char const *	progname;
 extern char	*sys_phone[];		/* ACTS phone numbers */
-extern bool	config_priority_override;
 extern char *ntp_signd_socket;
 extern struct config_tree_tag *cfg_tree_history;
 
=====================================
ntpd/ntp_config.c
=====================================
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -144,8 +144,6 @@ char	*sys_phone[MAXPHONE] = {NULL};	/* ACTS phone numbers */
 char	default_keysdir[] = NTP_KEYSDIR;
 char	*keysdir = default_keysdir;	/* crypto keys directory */
 char *	saveconfigdir;
-bool	config_priority_override = false;
-int	config_priority;
 
 static char default_ntp_signd_socket[] =
 #ifdef MSSNTP_PATH
=====================================
ntpd/ntp_intercept.c
=====================================
--- a/ntpd/ntp_intercept.c
+++ b/ntpd/ntp_intercept.c
@@ -686,7 +686,11 @@ static char *lfpdump(l_fp *fp)
     np <<= FRACTION_PREC;
     np |= fp->l_uf;
 
+#if SIZEOF_LONG_LONG == SIZEOF_LONG
     snprintf(buf, LIB_BUFLENGTH, "%lx", np);
+#else
+    snprintf(buf, LIB_BUFLENGTH, "%llx", np);
+#endif
 
     return buf;
 }
@@ -695,7 +699,11 @@ static void lfpload(char *str, l_fp *fp)
 {
     uint64_t	np;
 
+#if SIZEOF_LONG_LONG == SIZEOF_LONG
     sscanf(str, "%lx", &np);
+#else
+    sscanf(str, "%llx", &np);
+#endif
     
     (fp)->l_uf = (np) & 0xFFFFFFFF;					\
     (fp)->l_ui = (((np) >> FRACTION_PREC) & 0xFFFFFFFF);		\
=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -106,8 +106,8 @@ int	waitsync_fd_to_close = -1;	/* -w/--wait-sync */
  */
 bool initializing;
 
-extern bool config_priority_override;
-static int config_priority;
+bool config_priority_override = false;
+int config_priority;
 
 char const *progname;
 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/7b0c834b1b800c49b45b0b7f11a5b85b5010dfe2...72b2d7b9e6b6c64e95c03d1948e44d2c99d99cbd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160110/3ce348b2/attachment.html>
    
    
More information about the vc
mailing list