From 601e5b475abdbcb837c052e9567ed5df88b0feb7 Mon Sep 17 00:00:00 2001 From: Alex Young Date: Thu, 7 Jun 2012 16:00:38 +0100 Subject: [PATCH] Tidy the NULLCHECK macro to swallow semicolons properly --- src/util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util.h b/src/util.h index 6f1a39f..edd4386 100644 --- a/src/util.h +++ b/src/util.h @@ -31,7 +31,8 @@ void debug(const char*msg, ...); if (test < 0) { error(1, 1, 0, NULL, msg, ##__VA_ARGS__); } -#define NULLCHECK(x); if ( NULL == (x) ) { SERVER_ERROR( "Null " #x "." ); } +#define NULLCHECK(x) \ + do { if ( NULL == (x) ) { SERVER_ERROR( "Null " #x "." ); } } while(0) #endif