From: Thomas Bernard Date: Mon, 16 Feb 2015 22:42:54 +0000 (+0100) Subject: Fix mixed declarations and code (forbidden by ISO C90) X-Git-Tag: release-2.1.6-beta~93^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c7f21781a99a2deda50f5d6a38742a6822fbe10;p=libevent Fix mixed declarations and code (forbidden by ISO C90) --- diff --git a/test/regress_bufferevent.c b/test/regress_bufferevent.c index ea64202a..a87e02ed 100644 --- a/test/regress_bufferevent.c +++ b/test/regress_bufferevent.c @@ -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; }