uloop: allow passing 0 as timeout to uloop_run

Useful for processing only immediate timers and fds

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2017-06-17 11:47:21 +02:00
parent 4bc3decf87
commit fd57eea9f3

View file

@ -548,7 +548,7 @@ int uloop_run_timeout(int timeout)
uloop_gettime(&tv);
next_time = uloop_get_next_timeout(&tv);
if (timeout > 0 && timeout < next_time)
if (timeout >= 0 && timeout < next_time)
next_time = timeout;
uloop_run_events(next_time);
}