]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: don't use uninitialized value [coverity scan]
authorKarel Zak <kzak@redhat.com>
Thu, 23 May 2019 13:28:07 +0000 (15:28 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 23 May 2019 13:28:07 +0000 (15:28 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/hwclock.c

index 9512f696ef9de7357d828d1f5c6ed0daab2df644..a2c5cc2a49627924e7d86790f74f0da0d8db0657 100644 (file)
@@ -971,7 +971,7 @@ manipulate_clock(const struct hwclock_control *ctl, const time_t set_time,
         */
        struct timeval startup_hclocktime = { 0 };
        /* Total Hardware Clock drift correction needed. */
-       struct timeval tdrift;
+       struct timeval tdrift = { 0 };
 
        if ((ctl->set || ctl->systohc || ctl->adjust) &&
            (adjtime->local_utc == UTC) != ctl->universal) {