Tidy the NULLCHECK macro to swallow semicolons properly

This commit is contained in:
Alex Young
2012-06-07 16:00:38 +01:00
parent c628435f77
commit 601e5b475a

View File

@@ -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