smbd: Avoid an "else"
authorVolker Lendecke <vl@samba.org>
Fri, 4 Aug 2017 08:44:59 +0000 (10:44 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 13 Nov 2017 22:54:46 +0000 (23:54 +0100)
We always return in the if-branch before. The else is redundant

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/process.c

index b65ae2c1b1c0e505813e01173a1e9d48ecadde71..11a5ae8314c5c2741b7b95ad323d432d181fc574 100644 (file)
@@ -1973,7 +1973,8 @@ static void process_smb(struct smbXsrv_connection *xconn,
                        size_t pdulen = nread - NBT_HDR_SIZE;
                        smbd_smb2_process_negprot(xconn, 0, inpdu, pdulen);
                        return;
-               } else if (nread >= smb_size && valid_smb_header(inbuf)
+               }
+               if (nread >= smb_size && valid_smb_header(inbuf)
                                && CVAL(inbuf, smb_com) != 0x72) {
                        /* This is a non-negprot SMB1 packet.
                           Disable SMB2 from now on. */