From: Miroslav Lichvar Date: Wed, 7 Sep 2016 09:49:36 +0000 (+0200) Subject: sched: initialize sub-second part of saved_tv in SCH_MainLoop() X-Git-Tag: 3.0-pre1~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1afb285aad1fe6bc4d3742907ace0aff483c22b2;p=thirdparty%2Fchrony.git sched: initialize sub-second part of saved_tv in SCH_MainLoop() This is needed since commit d0dfa1de9e85510a584cdec5faae96c66d6847c9 to avoid valgrind errors. --- diff --git a/sched.c b/sched.c index d6a1ebac..2cbc29bb 100644 --- a/sched.c +++ b/sched.c @@ -707,8 +707,7 @@ SCH_MainLoop(void) saved_tv = tv; } else { ptv = NULL; - /* This is needed to fix a compiler warning */ - saved_tv.tv_sec = 0; + saved_tv.tv_sec = saved_tv.tv_usec = 0; } p_read_fds = &read_fds;