X-Git-Url: http://git.archive.openwrt.org/?p=project%2Flibubox.git;a=blobdiff_plain;f=uloop.c;h=0c57753444e16f361afd8f2d51a180436323aec9;hp=f5032418ed6697bf5035cbe3cdedf1c3ff85880b;hb=4bc3decf8743c0add93d434a639bb1b449b6da11;hpb=6a7fb7d8df308d18167051447fa489de389588df diff --git a/uloop.c b/uloop.c index f503241..0c57753 100644 --- a/uloop.c +++ b/uloop.c @@ -548,9 +548,9 @@ int uloop_run_timeout(int timeout) uloop_gettime(&tv); next_time = uloop_get_next_timeout(&tv); - if (timeout > 0 && next_time < timeout) - timeout = next_time; - uloop_run_events(timeout); + if (timeout > 0 && timeout < next_time) + next_time = timeout; + uloop_run_events(next_time); } if (!--uloop_run_depth)