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