Skip to content

Commit

Permalink
Remove a redundant condition (this branch is always res>0)
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsaiviking committed Oct 15, 2020
1 parent 9faf70f commit c4cfe17
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions nmap_ftp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,12 @@ void bounce_scan(Target *target, u16 *portarray, int numports,
}
else {
recvbuf[res] = '\0';
if (res > 0) {
if (o.debugging)
log_write(LOG_STDOUT, "nxt line: %s", recvbuf);
if (recvbuf[0] == '4' && recvbuf[1] == '2' && recvbuf[2] == '6') {
target->ports.forgetPort(portarray[i], IPPROTO_TCP);
if (o.debugging || o.verbose)
log_write(LOG_STDOUT, "Changed my mind about port %i\n", portarray[i]);
}
if (o.debugging)
log_write(LOG_STDOUT, "nxt line: %s", recvbuf);
if (recvbuf[0] == '4' && recvbuf[1] == '2' && recvbuf[2] == '6') {
target->ports.forgetPort(portarray[i], IPPROTO_TCP);
if (o.debugging || o.verbose)
log_write(LOG_STDOUT, "Changed my mind about port %i\n", portarray[i]);
}
}
}
Expand Down

0 comments on commit c4cfe17

Please sign in to comment.