>From 2aa4c74e43556c227ac8c4966689e178c9cbbe40 Mon Sep 17 00:00:00 2001 From: Fernando Carrijo <[email protected]> Date: Wed, 4 Aug 2010 23:39:21 -0300 Subject: [PATCH 2/2] dix: Fix indentation in WaitForSomething
Reviewed-by: Jamey Sharp <[email protected]> Reviewed-by: Tiago Vignatti <[email protected]> Signed-off-by: Fernando Carrijo <[email protected]> --- os/WaitFor.c | 55 ++++++++++++++++++++++++++++--------------------------- 1 files changed, 28 insertions(+), 27 deletions(-) diff --git a/os/WaitFor.c b/os/WaitFor.c index 66f67e5..14f9719 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -202,35 +202,36 @@ WaitForSomething(int *pClientsReady) } else { - /* Having no clients with input, then we check for expired timers in - * the global FIFO of timers. If any, we execute their callbacks. The - * variable wt is saved to be used by both BlockHandler() and Select() - * below. - */ - wt = NULL; - if (timers) - { - now = GetTimeInMillis(); - timeout = timers->expires - now; - if (timeout > 0 && timeout > timers->delta + 250) { - /* time has rewound. reset the timers. */ - CheckAllTimers(); - } - - if (timers) { + /* Having no clients with input, then we check for expired timers in + * the global FIFO of timers. If any, we execute their callbacks. The + * variable wt is saved to be used by both BlockHandler() and Select() + * below. + */ + wt = NULL; + if (timers) + { + now = GetTimeInMillis(); timeout = timers->expires - now; - if (timeout < 0) - timeout = 0; - waittime.tv_sec = timeout / MILLI_PER_SECOND; - waittime.tv_usec = (timeout % MILLI_PER_SECOND) * - (1000000 / MILLI_PER_SECOND); - wt = &waittime; + if (timeout > 0 && timeout > timers->delta + 250) { + /* time has rewound. reset the timers. */ + CheckAllTimers(); + } + + if (timers) { + timeout = timers->expires - now; + if (timeout < 0) + timeout = 0; + waittime.tv_sec = timeout / MILLI_PER_SECOND; + waittime.tv_usec = (timeout % MILLI_PER_SECOND) * + (1000000 / MILLI_PER_SECOND); + wt = &waittime; + } } - } - /* Having no clients with input, we set LastSelectMask to all - * sockets. It will be used by BlockHandler() down the road. - */ - XFD_COPYSET(&AllSockets, &LastSelectMask); + + /* Having no clients with input, we set LastSelectMask to all + * sockets. It will be used by BlockHandler() down the road. + */ + XFD_COPYSET(&AllSockets, &LastSelectMask); } /* To eliminate the load of both a signal handler and another call to -- 1.7.0.4
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
