From f529372e8ad7fda51e32f546cd245f378a1b80e2 Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Mon, 21 May 2012 02:30:22 +0000 Subject: [PATCH] Fix improper handling of variadic args with ICDEBUG PR: kern/168095 Submitted by: gcooper --- sys/libkern/iconv.c | 4 +--- sys/sys/iconv.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/libkern/iconv.c b/sys/libkern/iconv.c index 92b04c2864e..e03d8ca05ea 100644 --- a/sys/libkern/iconv.c +++ b/sys/libkern/iconv.c @@ -549,9 +549,7 @@ int iconv_lookupcp(char **cpp, const char *s) { if (cpp == NULL) { - ICDEBUG("warning a NULL list passed\n", ""); /* XXX ISO variadic macros cannot - leave out the - variadic args */ + ICDEBUG("warning a NULL list passed\n", ""); return ENOENT; } for (; *cpp; cpp++) diff --git a/sys/sys/iconv.h b/sys/sys/iconv.h index 671b24e1479..5e59795b6c7 100644 --- a/sys/sys/iconv.h +++ b/sys/sys/iconv.h @@ -240,7 +240,7 @@ int iconv_converter_tolowerstub(int c, void *handle); int iconv_converter_handler(module_t mod, int type, void *data); #ifdef ICONV_DEBUG -#define ICDEBUG(format, ...) printf("%s: "format, __func__ , __VA_ARGS__) +#define ICDEBUG(format, ...) printf("%s: "format, __func__ , ## __VA_ARGS__) #else #define ICDEBUG(format, ...) #endif