Fix mixed declarations and code (forbidden by ISO C90)

This commit is contained in:
Thomas Bernard 2015-02-16 23:42:54 +01:00
parent 746d2c502c
commit 0c7f21781a

View File

@ -233,10 +233,11 @@ static lock_wrapper *lu_find(void *lock_)
static void *trace_lock_alloc(unsigned locktype)
{
void *lock;
++lu_base.nr_locks;
lu_base.locks = realloc(lu_base.locks,
sizeof(lock_wrapper) * lu_base.nr_locks);
void *lock = lu_base.cbs.alloc(locktype);
lock = lu_base.cbs.alloc(locktype);
lu_base.locks[lu_base.nr_locks - 1] = (lock_wrapper){ lock, ALLOC, 0 };
return lock;
}