event_callback.c: Style fixes - mainly spacing
authorThomas Harning Jr <harningt@gmail.com>
Tue, 17 Jan 2012 02:17:40 +0000 (16 21:17 -0500)
committerThomas Harning Jr <harningt@gmail.com>
Tue, 17 Jan 2012 02:17:40 +0000 (16 21:17 -0500)
src/event_callback.c

index 1ffe684..810c616 100644 (file)
@@ -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)