From baab789ce8f0fe0f3954ab3f53627ea3da221523 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Mon, 26 Sep 2005 09:57:38 +0000 Subject: [PATCH] Replace the 'if (!cond) ; else code' construct with the standard 'do { code } while (0)' construct combined with a regular 'if'. --- dlls/ntdll/virtual.c | 2 +- dlls/user/menu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index ddc5af80ccb..277ea6a6729 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -134,7 +134,7 @@ static const UINT_PTR granularity_mask = 0xffff; /* Allocation granularity (usu (((UINT)(size) + ((UINT_PTR)(addr) & page_mask) + page_mask) & ~page_mask) #define VIRTUAL_DEBUG_DUMP_VIEW(view) \ - if (!TRACE_ON(virtual)); else VIRTUAL_DumpView(view) + do { if (TRACE_ON(virtual)) VIRTUAL_DumpView(view); } while (0) static void *user_space_limit = USER_SPACE_LIMIT; diff --git a/dlls/user/menu.c b/dlls/user/menu.c index dd4462d42b4..6500aa87398 100644 --- a/dlls/user/menu.c +++ b/dlls/user/menu.c @@ -198,7 +198,7 @@ const struct builtin_class_descr MENU_builtin_class = */ #define debug_print_menuitem(pre, mp, post) \ - if(!TRACE_ON(menu)) ; else do_debug_print_menuitem(pre, mp, post) + do { if (TRACE_ON(menu)) do_debug_print_menuitem(pre, mp, post); } while (0) #define MENUOUT(text) \ TRACE("%s%s", (count++ ? "," : ""), (text))