[Git][NTPsec/ntpsec][master] Address GitLab issue #200: compiler warnings...

Eric S. Raymond gitlab at mg.gitlab.com
Sat Dec 10 00:59:52 UTC 2016


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


Commits:
da233d20 by Eric S. Raymond at 2016-12-09T19:59:25-05:00
Address GitLab issue #200: compiler warnings...

...when building with glibc 2.10.

This code was pretty obviously wrong, not clear how it wasn't spotted sooner.

- - - - -


1 changed file:

- ntptime/ntptime.c


Changes:

=====================================
ntptime/ntptime.c
=====================================
--- a/ntptime/ntptime.c
+++ b/ntptime/ntptime.c
@@ -50,11 +50,7 @@
 
 /* MUSL port shim */
 #ifndef HAVE_NTP_GETTIME
-#ifdef STRUCT_NTPTIMEVAL_HAS_TAI
 int ntp_gettime(struct ntptimeval *ntv)
-#else
-int ntp_gettime(struct timex *ntv)
-#endif
 {
 	struct timex tntx;
 	int result;
@@ -121,11 +117,7 @@ main(
 {
 	extern int ntp_optind;
 	extern char *ntp_optarg;
-#ifdef STRUCT_NTPTIMEVAL_HAS_TAI
 	struct ntptimeval ntv;
-#else
-	struct timex ntv;
-#endif
 	struct timeval tv;
 	struct timex ntx, _ntx;
 	int	times[20];



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/da233d204ee5abc76d8e0a152d477f8e161a15f4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161210/30f5876a/attachment.html>


More information about the vc mailing list