From 6c21c895d9943f2be9662f71ea425cde8cf24658 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 3 Feb 2010 01:22:44 -0500 Subject: [PATCH] Remove EVUTIL_CHECK_FMT. This was never supposed to be an exposed API, so its name should have been more like _EVUTIL_CHECK_FMT. But it was only used in one place, so let's just eliminate it. --- include/event2/util.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/include/event2/util.h b/include/event2/util.h index d1355db1..d60fad2f 100644 --- a/include/event2/util.h +++ b/include/event2/util.h @@ -296,20 +296,14 @@ struct timezone; int evutil_gettimeofday(struct timeval *tv, struct timezone *tz); #endif -#ifdef __GNUC__ -/** Helper macro; used to tell the compiler that a given function takes a - * printf-like format string as argument number 'a', and a set of printf-like - * arguments starting in argument 'b'. */ -#define EVUTIL_CHECK_FMT(a,b) __attribute__((format(printf, a, b))) -#else -#define EVUTIL_CHECK_FMT(a,b) -#endif - /** Replacement for snprintf to get consistent behavior on platforms for which the return value of snprintf does not conform to C99. */ int evutil_snprintf(char *buf, size_t buflen, const char *format, ...) - EVUTIL_CHECK_FMT(3,4); +#ifdef __GNUC__ + __attribute__((format(printf, 3, 4))) +#endif +; int evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap); /** Replacement for inet_ntop for platforms which lack it. */