]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
cifs: remove set but not used variable 'server'
authorYueHaibing <yuehaibing@huawei.com>
Fri, 17 Jan 2020 02:57:17 +0000 (10:57 +0800)
committerSteve French <stfrench@microsoft.com>
Mon, 27 Jan 2020 01:24:17 +0000 (19:24 -0600)
fs/cifs/smb2pdu.c: In function 'SMB2_query_directory':
fs/cifs/smb2pdu.c:4444:26: warning:
 variable 'server' set but not used [-Wunused-but-set-variable]
  struct TCP_Server_Info *server;

It is not used, so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2pdu.c

index a23ca3d0dcd9b98daa29e2bc3e5742272985b84c..64d5a36a190193007157e7fb8d3a7e0960e13e25 100644 (file)
@@ -4441,13 +4441,10 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
        int resp_buftype = CIFS_NO_BUFFER;
        struct kvec rsp_iov;
        int rc = 0;
-       struct TCP_Server_Info *server;
        struct cifs_ses *ses = tcon->ses;
        int flags = 0;
 
-       if (ses && (ses->server))
-               server = ses->server;
-       else
+       if (!ses || !(ses->server))
                return -EIO;
 
        if (smb3_encryption_required(tcon))