]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Avoid an "else"
authorVolker Lendecke <vl@samba.org>
Wed, 13 Aug 2025 13:27:39 +0000 (15:27 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 22 Aug 2025 13:55:34 +0000 (13:55 +0000)
We return in the if-branch

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/smb2_process.c

index bd0e4644614665adbe2a45ad919d92376ef89a8b..c7fe20dd92879e3819b4eaf5a97ec8f7b2c610f6 100644 (file)
@@ -938,8 +938,9 @@ static void smbd_smb2_server_connection_read_handler(
                xconn->client->sconn->trans_num++;
                xconn->client->sconn->num_requests++;
                return;
+       }
 
-       } else if (!smbd_is_smb2_header(buffer, bufferlen)) {
+       if (!smbd_is_smb2_header(buffer, bufferlen)) {
                exit_server_cleanly("Invalid initial SMB2 packet");
                return;
        }