From: Tomas Hruby Date: Tue, 11 Aug 2009 07:53:32 +0000 (+0000) Subject: vm_assert macros fix up X-Git-Tag: v3.1.5~207 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=09a47e6a40efecc11e6f3647fb6a3539ec1f41a0;p=minix.git vm_assert macros fix up --- diff --git a/servers/vm/util.h b/servers/vm/util.h index 2b5bd6374..7d9082156 100644 --- a/servers/vm/util.h +++ b/servers/vm/util.h @@ -8,15 +8,15 @@ #define ELEMENTS(a) (sizeof(a)/sizeof((a)[0])) #if SANITYCHECKS -#define vm_assert(cond) { \ +#define vm_assert(cond) do { \ if(vm_sanitychecklevel > 0 && !(cond)) { \ printf("VM:%s:%d: assert failed: %s\n", \ __FILE__, __LINE__, #cond); \ panic("VM", "assert failed", NO_NUM); \ } \ - } + } while(0) #else -#define vm_assert(cond) ; +#define vm_assert(cond) #endif #define vm_panic(str, n) { char _pline[100]; \