[Git][NTPsec/ntpsec][master] 7 commits: remove uslelss extern keytype_from_text()

Gary E. Miller gitlab at mg.gitlab.com
Tue May 23 04:08:34 UTC 2017


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


Commits:
0cb09255 by Gary E. Miller at 2017-05-22T20:36:16-07:00
remove uslelss extern keytype_from_text()

- - - - -
ca39dcd3 by Gary E. Miller at 2017-05-22T20:38:24-07:00
remove unused typedef and extern: pset_tod_using set_tod_using()

- - - - -
9ee6ba07 by Gary E. Miller at 2017-05-22T20:43:05-07:00
ntpd: remove unused rereadkeys() and ntp_exit()

- - - - -
38d1f48c by Gary E. Miller at 2017-05-22T20:45:53-07:00
ntpd: remove redudnat (void) cast on function returning void.

- - - - -
fdeae584 by Gary E. Miller at 2017-05-22T20:50:19-07:00
remove two uneeded externs: octtoint() and ranp2()

- - - - -
ef833e76 by Gary E. Miller at 2017-05-22T21:02:47-07:00
remove unused extern: clockname()

- - - - -
7e1593b1 by Gary E. Miller at 2017-05-22T21:06:27-07:00
libntp: make  syslog_fname and syslog_abs_fname static.

- - - - -


5 changed files:

- include/ntp_stdlib.h
- include/ntp_syslog.h
- libntp/msyslog.c
- ntpd/ntp_util.c
- ntpd/ntpd.c


Changes:

=====================================
include/ntp_stdlib.h
=====================================
--- a/include/ntp_stdlib.h
+++ b/include/ntp_stdlib.h
@@ -47,7 +47,6 @@ extern	bool	authreadkeys	(const char *);
 extern	void	authtrust	(keyid_t, bool);
 extern	bool	authusekey	(keyid_t, int, const uint8_t *);
 
-extern	const char *clockname	(int);
 extern	int	clocktime	(int, int, int, int, int, uint32_t, uint32_t *, uint32_t *);
 extern	void	init_auth	(void);
 extern	void	init_lib	(void);
@@ -125,8 +124,6 @@ extern	char *	numtoa		(uint32_t);
 extern	const char * socktoa	(const sockaddr_u *);
 extern	const char * sockporttoa(const sockaddr_u *);
 extern	unsigned short	sock_hash(const sockaddr_u *) __attribute__((pure));
-extern	bool	octtoint	(const char *, unsigned long *);
-extern	unsigned long	ranp2		(int);
 extern	const char *refid_str	(uint32_t, int);
 
 extern	int	decodenetnum	(const char *, sockaddr_u *);
@@ -134,7 +131,6 @@ extern	int	decodenetnum	(const char *, sockaddr_u *);
 extern	void	signal_no_reset (int, void (*func)(int));
 
 extern	void	getauthkeys 	(const char *);
-extern	void	rereadkeys	(void);
 
 /*
  * Variable declarations for libntp.
@@ -167,13 +163,8 @@ extern int	ntp_optind;		/* global argv index */
 extern bool	ipv4_works;
 extern bool	ipv6_works;
 
-/* machines.c */
-typedef void (*pset_tod_using)(const char *);
-extern pset_tod_using	set_tod_using;
-
 /* ssl_init.c */
 extern	void	ssl_init		(void);
-extern	int	keytype_from_text	(const char *);
 
 /* strl-obsd.c */
 #ifndef HAVE_STRLCPY		/* + */


=====================================
include/ntp_syslog.h
=====================================
--- a/include/ntp_syslog.h
+++ b/include/ntp_syslog.h
@@ -16,8 +16,6 @@ extern bool	termlogit_pid;
 extern bool	msyslog_include_timestamp;
 extern FILE *	syslog_file;	/* if syslogit is false, log to
 				   this file and not syslog */
-extern char *	syslog_fname;
-extern char *	syslog_abs_fname;
 
 /*
  * syslog output control


=====================================
libntp/msyslog.c
=====================================
--- a/libntp/msyslog.c
+++ b/libntp/msyslog.c
@@ -21,8 +21,8 @@ bool	termlogit = false;	/* duplicate to stdout/err */
 bool	termlogit_pid = true;
 bool	msyslog_include_timestamp = true;
 FILE *	syslog_file;
-char *	syslog_fname;
-char *	syslog_abs_fname;
+static char *	syslog_fname;
+static char *	syslog_abs_fname;
 
 /* libntp default ntp_syslogmask is all bits lit */
 #define INIT_NTP_SYSLOGMASK	~(uint32_t)0


=====================================
ntpd/ntp_util.c
=====================================
--- a/ntpd/ntp_util.c
+++ b/ntpd/ntp_util.c
@@ -794,30 +794,6 @@ getauthkeys(
 	authreadkeys(key_file_name);
 }
 
-
-/*
- * rereadkeys - read the authentication key file over again.
- */
-void
-rereadkeys(void)
-{
-	if (NULL != key_file_name)
-		authreadkeys(key_file_name);
-}
-
-
-#ifdef __UNUSED__
-/*
- * ntp_exit - document explicitly that ntpd has exited
- */
-void
-ntp_exit(int retval)
-{
-	msyslog(LOG_ERR, "EXITING with return code %d", retval);
-	exit(retval);
-}
-#endif
-
 /*
  * ntpd_time_stepped is called back by step_systime(), allowing ntpd
  * to do any one-time processing necessitated by the step.


=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -663,11 +663,11 @@ ntpdmain(
 #endif
 
 # ifdef DEBUG
-	(void) signal_no_reset(MOREDEBUGSIG, moredebug);
-	(void) signal_no_reset(LESSDEBUGSIG, lessdebug);
+	signal_no_reset(MOREDEBUGSIG, moredebug);
+	signal_no_reset(LESSDEBUGSIG, lessdebug);
 # else
-	(void) signal_no_reset(MOREDEBUGSIG, no_debug);
-	(void) signal_no_reset(LESSDEBUGSIG, no_debug);
+	signal_no_reset(MOREDEBUGSIG, no_debug);
+	signal_no_reset(LESSDEBUGSIG, no_debug);
 # endif	/* DEBUG */
 
 	/*



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/55d764c84728f64a60ea8e867c58016f3d3f213d...7e1593b15708891fac415a89676374c831adf03c

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/55d764c84728f64a60ea8e867c58016f3d3f213d...7e1593b15708891fac415a89676374c831adf03c
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170523/19de3cd0/attachment.html>


More information about the vc mailing list