Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-06-17 12:47:21 +0300
committerFelix Fietkau <nbd@nbd.name>2017-06-17 12:47:49 +0300
commitfd57eea9f37e447814afbf934db626288aac23c4 (patch)
tree397746ddf7908aad0048bf20f4b746151e430e3d /uloop.c
parent4bc3decf8743c0add93d434a639bb1b449b6da11 (diff)
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>
Diffstat (limited to 'uloop.c')
-rw-r--r--uloop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/uloop.c b/uloop.c
index 0c57753..d2f41bb 100644
--- a/uloop.c
+++ b/uloop.c
@@ -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);
}