Commit 7d066459 authored by Jeff Layton's avatar Jeff Layton Committed by Steve French

cifs: make decode_ascii_ssetup void return

...rc is always set to 0.
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Acked-by: default avatarPavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent ffa598a5
...@@ -310,11 +310,10 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses, ...@@ -310,11 +310,10 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses,
return; return;
} }
static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, static void decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
struct cifs_ses *ses, struct cifs_ses *ses,
const struct nls_table *nls_cp) const struct nls_table *nls_cp)
{ {
int rc = 0;
int len; int len;
char *bcc_ptr = *pbcc_area; char *bcc_ptr = *pbcc_area;
...@@ -322,7 +321,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, ...@@ -322,7 +321,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
len = strnlen(bcc_ptr, bleft); len = strnlen(bcc_ptr, bleft);
if (len >= bleft) if (len >= bleft)
return rc; return;
kfree(ses->serverOS); kfree(ses->serverOS);
...@@ -339,7 +338,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, ...@@ -339,7 +338,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
len = strnlen(bcc_ptr, bleft); len = strnlen(bcc_ptr, bleft);
if (len >= bleft) if (len >= bleft)
return rc; return;
kfree(ses->serverNOS); kfree(ses->serverNOS);
...@@ -352,7 +351,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, ...@@ -352,7 +351,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
len = strnlen(bcc_ptr, bleft); len = strnlen(bcc_ptr, bleft);
if (len > bleft) if (len > bleft)
return rc; return;
/* No domain field in LANMAN case. Domain is /* No domain field in LANMAN case. Domain is
returned by old servers in the SMB negprot response */ returned by old servers in the SMB negprot response */
...@@ -360,8 +359,6 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, ...@@ -360,8 +359,6 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
but thus do return domain here we could add parsing but thus do return domain here we could add parsing
for it later, but it is not very important */ for it later, but it is not very important */
cifs_dbg(FYI, "ascii: bytes left %d\n", bleft); cifs_dbg(FYI, "ascii: bytes left %d\n", bleft);
return rc;
} }
int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len,
...@@ -938,8 +935,7 @@ CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses, ...@@ -938,8 +935,7 @@ CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses,
} }
decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses, nls_cp); decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses, nls_cp);
} else { } else {
rc = decode_ascii_ssetup(&bcc_ptr, bytes_remaining, decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses, nls_cp);
ses, nls_cp);
} }
ssetup_exit: ssetup_exit:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment