Skip to content

Commit

Permalink
Silence unnecessary warning after earlier code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsaiviking committed Apr 18, 2024
1 parent bedb592 commit 1bb2703
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions portlist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1bb2703

Please sign in to comment.