Replace the 'if (!cond) ; else code' construct with the standard 'do {

code } while (0)' construct combined with a regular 'if'.
This commit is contained in:
Francois Gouget 2005-09-26 09:57:38 +00:00 committed by Alexandre Julliard
parent 335fce9ce0
commit baab789ce8
2 changed files with 2 additions and 2 deletions

View File

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

View File

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