From: jake Date: Mon, 15 May 2006 21:42:02 +0000 (+0000) Subject: Change return value checking to the true meaning of the spec: X-Git-Url: http://git.samba.org/samba.git/?p=obnox%2Fwireshark%2Fwip.git;a=commitdiff_plain;h=6683e849027ceb6a860a4cf4d4e504c0a27b929d Change return value checking to the true meaning of the spec: "If the function succeeds, the return value is nonzero." This may or may not solve bug 915. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18168 f5534014-38df-0310-8fa8-9805f1628bb7 --- diff --git a/epan/emem.c b/epan/emem.c index 183a25406c..c3f88d4445 100644 --- a/epan/emem.c +++ b/epan/emem.c @@ -268,9 +268,9 @@ emem_create_chunk(emem_chunk_t **free_list) { prot2 = (char *) ((((int) buf_end - (1 * pagesize)) / pagesize) * pagesize); ret = VirtualProtect(prot1, pagesize, PAGE_NOACCESS, &oldprot); - g_assert(ret == TRUE || versinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS); + g_assert(ret != 0 || versinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS); ret = VirtualProtect(prot2, pagesize, PAGE_NOACCESS, &oldprot); - g_assert(ret == TRUE || versinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS); + g_assert(ret != 0 || versinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS); npc->amount_free_init = prot2 - prot1 - pagesize; npc->amount_free = npc->amount_free_init;