]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Fix a "set but not used" warning
authorVolker Lendecke <vl@samba.org>
Tue, 2 Aug 2022 11:08:43 +0000 (13:08 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 4 Aug 2022 21:46:23 +0000 (21:46 +0000)
This is copy&paste from reply_negprot() where this variable was used
to set the remote architecture. This isn't used anymore in the
stripped down smb2 version of this.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug  4 21:46:23 UTC 2022 on sn-devel-184

source3/smbd/smb2_negprot.c

index da567951c0bfe3baa3656d355da931fef7cb622b..baddbecaade9d3a4ce1bcf14542cd5075304512f 100644 (file)
@@ -1053,7 +1053,6 @@ NTSTATUS smb2_multi_protocol_reply_negprot(struct smb_request *req)
        bool choice_set = false;
        int protocol;
        const char *p;
-       int protocols = 0;
        int num_cliprotos;
        char **cliprotos;
        size_t i;
@@ -1117,14 +1116,6 @@ NTSTATUS smb2_multi_protocol_reply_negprot(struct smb_request *req)
                p += strlen(p) + 2;
        }
 
-       for (i=0; i<num_cliprotos; i++) {
-               if (strcsequal(cliprotos[i], "SMB 2.002")) {
-                       protocols |= PROT_SMB_2_002;
-               } else if (strcsequal(cliprotos[i], "SMB 2.???")) {
-                       protocols |= PROT_SMB_2_FF;
-               }
-       }
-
        /* possibly reload - change of architecture */
        reload_services(sconn, conn_snum_used, true);