From: Thomas Harning Jr Date: Tue, 17 Jan 2012 02:17:40 +0000 (-0500) Subject: event_callback.c: Style fixes - mainly spacing X-Git-Tag: v0.4.0~5 X-Git-Url: https://repo.or.cz/w/luaevent.git/commitdiff_plain/8fd3405107dc334018dc83f2a960c11b8f6c5c23 event_callback.c: Style fixes - mainly spacing --- diff --git a/src/event_callback.c b/src/event_callback.c index 1ffe684..810c616 100644 --- a/src/event_callback.c +++ b/src/event_callback.c @@ -34,11 +34,11 @@ void luaevent_callback(int fd, short event, void* p) { if(!cb->base) return; /* event was destroyed during callback */ ret = lua_tointeger(L, -2); - if(lua_isnumber(L, -1)) - { + if(lua_isnumber(L, -1)) { double newTimeout = lua_tonumber(L, -1); - if(newTimeout>0) + if(newTimeout > 0) { load_timeval(newTimeout, &new_tv); + } } lua_pop(L, 2); if(ret == -1) { @@ -46,8 +46,7 @@ void luaevent_callback(int fd, short event, void* p) { } else { struct event *ev = &cb->ev; int newEvent = ret; - if( newEvent != event || (cb->timeout.tv_sec != new_tv.tv_sec || cb->timeout.tv_usec != new_tv.tv_usec) ) - { + if( newEvent != event || (cb->timeout.tv_sec != new_tv.tv_sec || cb->timeout.tv_usec != new_tv.tv_usec) ) { struct timeval *ptv = &cb->timeout; cb->timeout = new_tv; if(!cb->timeout.tv_sec && !cb->timeout.tv_usec)