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
This commit is contained in:
parent
eca9dc3e14
commit
4e2fb1a6df
1 changed files with 4 additions and 2 deletions
|
|
@ -42,8 +42,10 @@ static int pools_initialized = 0;
|
||||||
static void
|
static void
|
||||||
CreatePool() {
|
CreatePool() {
|
||||||
Pool *p = 0;
|
Pool *p = 0;
|
||||||
assert((p = (Pool *) DohMalloc(sizeof(Pool))));
|
p = (Pool *) DohMalloc(sizeof(Pool));
|
||||||
assert((p->ptr = (DohBase *) DohMalloc(sizeof(DohBase)*PoolSize)));
|
assert(p);
|
||||||
|
p->ptr = (DohBase *) DohMalloc(sizeof(DohBase)*PoolSize);
|
||||||
|
assert(p->ptr);
|
||||||
p->len = PoolSize;
|
p->len = PoolSize;
|
||||||
p->blen = PoolSize*sizeof(DohBase);
|
p->blen = PoolSize*sizeof(DohBase);
|
||||||
p->current = 0;
|
p->current = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue