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

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