From: Miroslav Lichvar Date: Thu, 2 Nov 2023 11:41:55 +0000 (+0100) Subject: ntp: initialize network correction of transmitted packets X-Git-Tag: 4.5-pre1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51a621bc2bfa8f2c695c19c565799fb88ddf055b;p=thirdparty%2Fchrony.git ntp: initialize network correction of transmitted packets Initialize the unused value of network correction parsed from own transmitted packets to avoid a use-of-uninitialized-value error in NIO_UnwrapMessage() reported by clang. Fixes: 6372a9f93f59 ("ntp: save PTP correction from NTP-over-PTP messages") --- diff --git a/ntp_io_linux.c b/ntp_io_linux.c index e797f34a..3b6874e3 100644 --- a/ntp_io_linux.c +++ b/ntp_io_linux.c @@ -727,7 +727,7 @@ NIO_Linux_ProcessMessage(SCK_Message *message, NTP_Local_Address *local_addr, { struct Interface *iface; int is_tx, ts_if_index, l2_length; - double c; + double c = 0.0; is_tx = event == SCH_FILE_EXCEPTION; iface = NULL;