From 2afbb788ff43c5cb5a91fb3da9cae6bd9a70731f Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Wed, 14 Nov 2018 16:36:31 +0400 Subject: slirp: improve a bit the debug macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let them accept multiple arguments. Simplify the inner argument handling of DEBUG_ARGS/DEBUG_MISC_DEBUG_ERROR. Signed-off-by: Marc-André Lureau Signed-off-by: Samuel Thibault --- slirp/bootp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'slirp/bootp.c') diff --git a/slirp/bootp.c b/slirp/bootp.c index 7b1af73c95..5ab6692038 100644 --- a/slirp/bootp.c +++ b/slirp/bootp.c @@ -37,8 +37,7 @@ static const uint8_t rfc1533_cookie[] = { RFC1533_COOKIE }; #ifdef DEBUG -#define DPRINTF(fmt, ...) \ -do if (slirp_debug & DBG_CALL) { fprintf(dfd, fmt, ## __VA_ARGS__); fflush(dfd); } while (0) +#define DPRINTF(fmt, ...) DEBUG_CALL(fmt, ##__VA_ARGS__) #else #define DPRINTF(fmt, ...) do{}while(0) #endif -- cgit 1.4.1