mirror of
https://github.com/troglobit/libuev.git
synced 2026-11-18 19:41:09 +00:00
Fix logical error, read before set, found by Valgrind
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
505a7214a8
commit
d7485c59ec
1 file changed
+2
-1
+2
-1
@@ -58,10 +58,11 @@ int main(void)
|
|||||||
uev_init(&ctx);
|
uev_init(&ctx);
|
||||||
|
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
|
when = tv.tv_sec + TIMEOUT;
|
||||||
|
|
||||||
printf("Start of test %s", ctime(&tv.tv_sec));
|
printf("Start of test %s", ctime(&tv.tv_sec));
|
||||||
printf("Expected cron %s", ctime(&when));
|
printf("Expected cron %s", ctime(&when));
|
||||||
|
|
||||||
when = tv.tv_sec + TIMEOUT;
|
|
||||||
interval = INTERVAL;
|
interval = INTERVAL;
|
||||||
uev_cron_init(&ctx, &cron_watcher, cron_job, NULL, when, interval);
|
uev_cron_init(&ctx, &cron_watcher, cron_job, NULL, when, interval);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user