From 1bb2703c51c78e2e445f966cc03e5b308f906f98 Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 18 Apr 2024 15:47:39 +0000 Subject: [PATCH] Silence unnecessary warning after earlier code changes --- portlist.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/portlist.cc b/portlist.cc index e70b7d7df3..9e7044795c 100644 --- a/portlist.cc +++ b/portlist.cc @@ -486,11 +486,9 @@ void PortList::setPortState(u16 portno, u8 protocol, int state, int *oldstate) { current = createPort(portno, protocol, &created); if (!created) { - /* We must discount our statistics from the old values. Also warn - if a complete duplicate */ - if (o.debugging && current->state == state) { - error("Duplicate port (%hu/%s)", portno, proto2ascii_lowercase(protocol)); - } + /* We must discount our statistics from the old values. + * Duplicates are not a problem and are expected due to optimistic state + * setting in ultrascan_port_pspec_update() */ state_counts_proto[proto][current->state]--; if (oldstate) *oldstate = current->state; } else {