]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
cifs: make decode_ascii_ssetup void return
authorJeff Layton <jlayton@redhat.com>
Fri, 24 May 2013 11:41:00 +0000 (07:41 -0400)
committerSteve French <sfrench@us.ibm.com>
Fri, 24 May 2013 18:27:14 +0000 (13:27 -0500)
...rc is always set to 0.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/sess.c

index f230571a7ab30d1c7d809eafbfdf9cb5724c2dd3..838e2240fc557881695e4cf6e4114937010b2904 100644 (file)
@@ -310,11 +310,10 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses,
        return;
 }
 
-static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
-                              struct cifs_ses *ses,
-                              const struct nls_table *nls_cp)
+static void decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
+                               struct cifs_ses *ses,
+                               const struct nls_table *nls_cp)
 {
-       int rc = 0;
        int len;
        char *bcc_ptr = *pbcc_area;
 
@@ -322,7 +321,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
 
        len = strnlen(bcc_ptr, bleft);
        if (len >= bleft)
-               return rc;
+               return;
 
        kfree(ses->serverOS);
 
@@ -339,7 +338,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
 
        len = strnlen(bcc_ptr, bleft);
        if (len >= bleft)
-               return rc;
+               return;
 
        kfree(ses->serverNOS);
 
@@ -352,7 +351,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
 
        len = strnlen(bcc_ptr, bleft);
        if (len > bleft)
-               return rc;
+               return;
 
        /* No domain field in LANMAN case. Domain is
           returned by old servers in the SMB negprot response */
@@ -360,8 +359,6 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
           but thus do return domain here we could add parsing
           for it later, but it is not very important */
        cifs_dbg(FYI, "ascii: bytes left %d\n", bleft);
-
-       return rc;
 }
 
 int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len,
@@ -938,8 +935,7 @@ ssetup_ntlmssp_authenticate:
                }
                decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses, nls_cp);
        } else {
-               rc = decode_ascii_ssetup(&bcc_ptr, bytes_remaining,
-                                        ses, nls_cp);
+               decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses, nls_cp);
        }
 
 ssetup_exit: