From c4cfe174beba4e5c1aaf15e5abf2a66360e8d538 Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 15 Oct 2020 18:19:06 +0000 Subject: [PATCH] Remove a redundant condition (this branch is always res>0) --- nmap_ftp.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/nmap_ftp.cc b/nmap_ftp.cc index 2825d48d6..36b30d095 100644 --- a/nmap_ftp.cc +++ b/nmap_ftp.cc @@ -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]); } } }