From: Volker Lendecke Date: Fri, 4 Aug 2017 08:44:59 +0000 (+0200) Subject: smbd: Avoid an "else" X-Git-Tag: talloc-2.1.11~502 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1f071b1a25b33d5667acd6d4185de2a4b6826b2d;p=thirdparty%2Fsamba.git smbd: Avoid an "else" We always return in the if-branch before. The else is redundant Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/process.c b/source3/smbd/process.c index b65ae2c1b1c..11a5ae8314c 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -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. */