Change return value checking to the true meaning of the spec:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 15 May 2006 21:42:02 +0000 (21:42 +0000)
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 15 May 2006 21:42:02 +0000 (21:42 +0000)
"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

epan/emem.c

index 183a25406c67aae034815f4b1b3580be1b9f5fb3..c3f88d4445b5cbe2313f8fcf159d7f5f9459f6f7 100644 (file)
@@ -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;