mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Fix mixed declarations and code (forbidden by ISO C90)
This commit is contained in:
parent
746d2c502c
commit
0c7f21781a
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user