]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add do / while wrapper so that the caller uses ';' to end lines
authorAlan T. DeKok <aland@freeradius.org>
Wed, 23 Oct 2019 16:54:30 +0000 (12:54 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 23 Oct 2019 16:54:52 +0000 (12:54 -0400)
src/lib/util/debug.h

index 5a489f31bf5897724e2485f8f352842cb5254350..69eca6d65d43f479944a02fc5021251699143ff2 100644 (file)
@@ -29,7 +29,7 @@ extern "C" {
 #include <freeradius-devel/missing.h>
 #include <freeradius-devel/util/fring.h>
 
-#define MEM(x) if (!(x)) { ERROR("%s[%u] OUT OF MEMORY", __FILE__, __LINE__); _fr_exit_now(__FILE__, __LINE__, EXIT_FAILURE); }
+#define MEM(x) do { if (!(x)) { ERROR("%s[%u] OUT OF MEMORY", __FILE__, __LINE__); _fr_exit_now(__FILE__, __LINE__, EXIT_FAILURE); } } while (0)
 
 typedef enum {
        DEBUGGER_STATE_UNKNOWN_NO_PTRACE        = -3,   //!< We don't have ptrace so can't check.