From: Dave Hart Date: Fri, 31 Dec 2010 23:55:50 +0000 (+0000) Subject: remove -dev-only remains of earlier [Bug 1764] fix from X-Git-Tag: NTP_4_2_7P108~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c014d9c6e3ec4333d45f352cd9caefb5a62f195f;p=thirdparty%2Fntp.git remove -dev-only remains of earlier [Bug 1764] fix from ntpd/refclock_conf.c bk: 4d1e6d86c-KDecKxnB1Ark8fki9Chw --- diff --git a/include/ntpd.h b/include/ntpd.h index 3bd975563..ddbb8c702 100644 --- a/include/ntpd.h +++ b/include/ntpd.h @@ -8,9 +8,9 @@ * Each half is further divided into sections for each source file. */ -#include "ntp_syslog.h" -#include "ntp_fp.h" #include "ntp.h" +#include "ntp_stdlib.h" +#include "ntp_syslog.h" #include "ntp_debug.h" #include "ntp_select.h" #include "ntp_malloc.h" @@ -295,7 +295,8 @@ extern void record_peer_stats (sockaddr_u *, int, double, double, double, double extern void record_proto_stats (char *); extern void record_loop_stats (double, double, double, double, int); extern void record_clock_stats (sockaddr_u *, const char *); -extern int mprintf_clock_stats(sockaddr_u *, const char *, ...); +extern int mprintf_clock_stats(sockaddr_u *, const char *, ...) + __attribute__((__format__(__printf__, 2, 3))); extern void record_raw_stats (sockaddr_u *, sockaddr_u *, l_fp *, l_fp *, l_fp *, l_fp *); extern u_long leap_month(u_long); extern void record_crypto_stats (sockaddr_u *, const char *); diff --git a/ntpd/ntp_util.c b/ntpd/ntp_util.c index 85a3f7b1d..ed422129c 100644 --- a/ntpd/ntp_util.c +++ b/ntpd/ntp_util.c @@ -698,12 +698,11 @@ mprintf_clock_stats( int rc; char msg[512]; - if (!stats_control) - return; va_start(ap, fmt); rc = mvsnprintf(msg, sizeof(msg), fmt, ap); va_end(ap); - record_clock_stats(addr, msg); + if (stats_control) + record_clock_stats(addr, msg); return rc; } diff --git a/ntpd/refclock_conf.c b/ntpd/refclock_conf.c index 8b1e3044c..845e913f7 100644 --- a/ntpd/refclock_conf.c +++ b/ntpd/refclock_conf.c @@ -7,12 +7,6 @@ #include #include -#ifdef HAVE_TERMIOS_H -# include -#endif -#ifdef HAVE_SYS_IOCTL_H -# include /* TIOCMSET here in recent Linux */ -#endif #include "ntpd.h" #include "ntp_refclock.h"