From 51a621bc2bfa8f2c695c19c565799fb88ddf055b Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 2 Nov 2023 12:41:55 +0100 Subject: [PATCH] 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") --- ntp_io_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntp_io_linux.c b/ntp_io_linux.c index e797f34..3b6874e 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;