Skip to content

Commit c4cfe17

Browse files
committed
Remove a redundant condition (this branch is always res>0)
1 parent 9faf70f commit c4cfe17

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

nmap_ftp.cc

+6-8
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,12 @@ void bounce_scan(Target *target, u16 *portarray, int numports,
321321
}
322322
else {
323323
recvbuf[res] = '\0';
324-
if (res > 0) {
325-
if (o.debugging)
326-
log_write(LOG_STDOUT, "nxt line: %s", recvbuf);
327-
if (recvbuf[0] == '4' && recvbuf[1] == '2' && recvbuf[2] == '6') {
328-
target->ports.forgetPort(portarray[i], IPPROTO_TCP);
329-
if (o.debugging || o.verbose)
330-
log_write(LOG_STDOUT, "Changed my mind about port %i\n", portarray[i]);
331-
}
324+
if (o.debugging)
325+
log_write(LOG_STDOUT, "nxt line: %s", recvbuf);
326+
if (recvbuf[0] == '4' && recvbuf[1] == '2' && recvbuf[2] == '6') {
327+
target->ports.forgetPort(portarray[i], IPPROTO_TCP);
328+
if (o.debugging || o.verbose)
329+
log_write(LOG_STDOUT, "Changed my mind about port %i\n", portarray[i]);
332330
}
333331
}
334332
}

0 commit comments

Comments
 (0)