]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3655] ntpdc memstats hash counts
authorJuergen Perlinger <perlinger@ntp.org>
Sat, 4 Apr 2020 06:57:51 +0000 (08:57 +0200)
committerJuergen Perlinger <perlinger@ntp.org>
Sat, 4 Apr 2020 06:57:51 +0000 (08:57 +0200)
bk: 5e882fefpRHzn_HtbLtBftgmjR6I9w

ChangeLog
ntpd/ntp_request.c

index 35d5d36c2faf434a0bbc79ed85afe3473cc63039..d109dca9f733a8610d95cbe360b2a076a1e053b6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+---
+* [Bug 3655] ntpdc memstats hash counts <perlinger@ntp.org>
+  - fix by Gerry garvey
+
 ---
 (4.2.8p14) 2020/03/03 Released by Harlan Stenn <stenn@ntp.org>
 
index bffdec5a9d1ddab7d9cfe02868906a37c4082ed1..e7997a3b90951e477f1c66f5a5eb9148e819e3c6 100644 (file)
@@ -1184,7 +1184,7 @@ mem_stats(
 
        for (i = 0; i < NTP_HASH_SIZE; i++)
                ms->hashcount[i] = (u_char)
-                   max((u_int)peer_hash_count[i], UCHAR_MAX);
+                   min((u_int)peer_hash_count[i], UCHAR_MAX);
 
        (void) more_pkt();
        flush_pkt();