[Git][NTPsec/ntpsec][master] fix bug #498

Mark Atwood gitlab at mg.gitlab.com
Mon Sep 10 16:37:46 UTC 2018


Mark Atwood pushed to branch master at NTPsec / ntpsec


Commits:
d794d044 by James Browning at 2018-09-05T17:25:58Z
fix bug #498

- - - - -


2 changed files:

- include/ntp_stdlib.h
- tests/libntp/msyslog.c


Changes:

=====================================
include/ntp_stdlib.h
=====================================
@@ -21,6 +21,10 @@
 #include <bsd/string.h>
 #endif
 
+#ifndef __sysloglike
+#define __sysloglike(fmt, args) ;
+#endif /* __sysloglike */
+
 #ifdef __GNUC__
 #define NTP_PRINTF(fmt, args) __attribute__((__format__(__printf__, fmt, args)))
 #else
@@ -29,10 +33,10 @@
 
 extern const char *ntpd_version(void);
 
-extern	int	mprintf(const char *, ...) NTP_PRINTF(1, 2);
+extern	int	mprintf(const char *, ...) __sysloglike(1, 2);
 extern	int	mvsnprintf(char *, size_t, const char *, va_list)
-			NTP_PRINTF(3, 0);
-extern	void	msyslog(int, const char *, ...) NTP_PRINTF(2, 3);
+			__sysloglike(3, 0);
+extern	void	msyslog(int, const char *, ...) __sysloglike(2, 3);
 extern	void	init_logging	(const char *, uint32_t, int);
 extern	int	change_logfile	(const char *, bool);
 extern	void	reopen_logfile  (void);


=====================================
tests/libntp/msyslog.c
=====================================
@@ -15,7 +15,7 @@ TEST_TEAR_DOWN(msyslog) {}
 #include <string.h>
 #include <errno.h>
 
-static int     msnprintf(char *, size_t, const char *, ...) NTP_PRINTF(3, 4);
+static int     msnprintf(char *, size_t, const char *, ...) __sysloglike(3, 4);
 
 static int
 msnprintf(



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/d794d044cf9014bfede1637143d5ab77a6443594

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/d794d044cf9014bfede1637143d5ab77a6443594
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/20180910/1a13178b/attachment-0001.html>


More information about the vc mailing list