diff options
author | David Lamparter <equinox@diac24.net> | 2019-06-12 17:08:01 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2019-06-12 19:35:43 +0200 |
commit | afb35622ef61212f0fe960a31c2326a9379bceae (patch) | |
tree | a3e691f3bd7e9d59871462d1bab8bdef63d3dd24 /lib/log.h | |
parent | lib: use snprintfrr() in "hidden" printfs (diff) | |
download | frr-afb35622ef61212f0fe960a31c2326a9379bceae.tar.xz frr-afb35622ef61212f0fe960a31c2326a9379bceae.zip |
lib: make "%Ld" work for int64_t
... without compiler plugins.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/log.h')
-rw-r--r-- | lib/log.h | 19 |
1 files changed, 6 insertions, 13 deletions
@@ -81,20 +81,13 @@ extern void openzlog(const char *progname, const char *protoname, /* Close zlog function. */ extern void closezlog(void); -/* GCC have printf type attribute check. */ -#ifdef __GNUC__ -#define PRINTF_ATTRIBUTE(a,b) __attribute__ ((__format__ (__printf__, a, b))) -#else -#define PRINTF_ATTRIBUTE(a,b) -#endif /* __GNUC__ */ - /* Handy zlog functions. */ -extern void zlog_err(const char *format, ...) PRINTF_ATTRIBUTE(1, 2); -extern void zlog_warn(const char *format, ...) PRINTF_ATTRIBUTE(1, 2); -extern void zlog_info(const char *format, ...) PRINTF_ATTRIBUTE(1, 2); -extern void zlog_notice(const char *format, ...) PRINTF_ATTRIBUTE(1, 2); -extern void zlog_debug(const char *format, ...) PRINTF_ATTRIBUTE(1, 2); -extern void zlog(int priority, const char *format, ...) PRINTF_ATTRIBUTE(2, 3); +extern void zlog_err(const char *format, ...) PRINTFRR(1, 2); +extern void zlog_warn(const char *format, ...) PRINTFRR(1, 2); +extern void zlog_info(const char *format, ...) PRINTFRR(1, 2); +extern void zlog_notice(const char *format, ...) PRINTFRR(1, 2); +extern void zlog_debug(const char *format, ...) PRINTFRR(1, 2); +extern void zlog(int priority, const char *format, ...) PRINTFRR(2, 3); /* For logs which have error codes associated with them */ #define flog_err(ferr_id, format, ...) \ |