1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-22 07:29:01 +00:00

Remove a redundant condition (this branch is always res>0)

This commit is contained in:
dmiller
2020-10-15 18:19:06 +00:00
parent 9faf70fc78
commit c4cfe174be

View File

@@ -321,14 +321,12 @@ void bounce_scan(Target *target, u16 *portarray, int numports,
} }
else { else {
recvbuf[res] = '\0'; recvbuf[res] = '\0';
if (res > 0) { if (o.debugging)
if (o.debugging) log_write(LOG_STDOUT, "nxt line: %s", recvbuf);
log_write(LOG_STDOUT, "nxt line: %s", recvbuf); if (recvbuf[0] == '4' && recvbuf[1] == '2' && recvbuf[2] == '6') {
if (recvbuf[0] == '4' && recvbuf[1] == '2' && recvbuf[2] == '6') { target->ports.forgetPort(portarray[i], IPPROTO_TCP);
target->ports.forgetPort(portarray[i], IPPROTO_TCP); if (o.debugging || o.verbose)
if (o.debugging || o.verbose) log_write(LOG_STDOUT, "Changed my mind about port %i\n", portarray[i]);
log_write(LOG_STDOUT, "Changed my mind about port %i\n", portarray[i]);
}
} }
} }
} }