OpenNTPD daemon with OpenSSL implementation & flexible configurability
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

24 lines
709 B

From: Pekka Helenius <fincer89@hotmail.com>
Date: Tue, 04 Aug 2020 01:52:12 +0300
Subject: Fix C compiler warning about uninitialized variable peercount
--- a/src/ntp.c 2020-08-01 00:56:09.608057581 +0300
+++ b/src/ntp.c 2020-08-01 15:22:42.981445052 +0300
@@ -511,7 +511,7 @@ ntp_dispatch_imsg_dns(void)
u_int16_t dlen;
u_char *p;
struct ntp_addr *h;
- size_t addrcount, peercount;
+ size_t addrcount, peercount = 0;
int n;
if (((n = imsg_read(ibuf_dns)) == -1 && errno != EAGAIN) || n == 0)
@@ -540,7 +540,6 @@ ntp_dispatch_imsg_dns(void)
if (peer->addr_head.pool) {
n = 0;
- peercount = 0;
TAILQ_FOREACH_SAFE(npeer, &conf->ntp_peers,
entry, tmp) {