From 4e2fb1a6df3f6d846951138f86d6ecbec02afe01 Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Tue, 17 Oct 2000 22:04:20 +0000 Subject: [PATCH] Fixed weird assertion problem reported by Jan Delgado. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@923 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/DOH/Doh/memory.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SWIG/Source/DOH/Doh/memory.c b/SWIG/Source/DOH/Doh/memory.c index 56b522b06..fcf5ba341 100644 --- a/SWIG/Source/DOH/Doh/memory.c +++ b/SWIG/Source/DOH/Doh/memory.c @@ -42,8 +42,10 @@ static int pools_initialized = 0; static void CreatePool() { Pool *p = 0; - assert((p = (Pool *) DohMalloc(sizeof(Pool)))); - assert((p->ptr = (DohBase *) DohMalloc(sizeof(DohBase)*PoolSize))); + p = (Pool *) DohMalloc(sizeof(Pool)); + assert(p); + p->ptr = (DohBase *) DohMalloc(sizeof(DohBase)*PoolSize); + assert(p->ptr); p->len = PoolSize; p->blen = PoolSize*sizeof(DohBase); p->current = 0;