summaryrefslogtreecommitdiffstats
path: root/fs/cifs/sess.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-08-30 22:09:15 +0000
committerSteve French <sfrench@us.ibm.com>2007-08-30 22:09:15 +0000
commit26f57364d7cdef9d7ebe27c931fff5e4f21ffb1c (patch)
tree28f991e3ea9e87244312015398f5f25d2eee4405 /fs/cifs/sess.c
parentf01d5e14e764b14b6bf5512678523d009254b209 (diff)
downloadop-kernel-dev-26f57364d7cdef9d7ebe27c931fff5e4f21ffb1c.zip
op-kernel-dev-26f57364d7cdef9d7ebe27c931fff5e4f21ffb1c.tar.gz
[CIFS] formatting cleanup found by checkpatch
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/sess.c')
-rw-r--r--fs/cifs/sess.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 892be9b..78797c0 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -67,9 +67,8 @@ static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB)
pSMB->req.hdr.Flags2 |= SMBFLG2_DFS;
capabilities |= CAP_DFS;
}
- if (ses->capabilities & CAP_UNIX) {
+ if (ses->capabilities & CAP_UNIX)
capabilities |= CAP_UNIX;
- }
/* BB check whether to init vcnum BB */
return capabilities;
@@ -203,14 +202,11 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft,
if (len >= words_left)
return rc;
- if (ses->serverOS)
- kfree(ses->serverOS);
+ kfree(ses->serverOS);
/* UTF-8 string will not grow more than four times as big as UCS-16 */
ses->serverOS = kzalloc(4 * len, GFP_KERNEL);
- if (ses->serverOS != NULL) {
- cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len,
- nls_cp);
- }
+ if (ses->serverOS != NULL)
+ cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp);
data += 2 * (len + 1);
words_left -= len + 1;
@@ -220,8 +216,7 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft,
if (len >= words_left)
return rc;
- if (ses->serverNOS)
- kfree(ses->serverNOS);
+ kfree(ses->serverNOS);
ses->serverNOS = kzalloc(4 * len, GFP_KERNEL); /* BB this is wrong length FIXME BB */
if (ses->serverNOS != NULL) {
cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len,
@@ -240,8 +235,7 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft,
if (len > words_left)
return rc;
- if (ses->serverDomain)
- kfree(ses->serverDomain);
+ kfree(ses->serverDomain);
ses->serverDomain = kzalloc(2 * (len + 1), GFP_KERNEL); /* BB FIXME wrong length */
if (ses->serverDomain != NULL) {
cifs_strfromUCS_le(ses->serverDomain, (__le16 *)data, len,
@@ -271,8 +265,7 @@ static int decode_ascii_ssetup(char **pbcc_area, int bleft,
if (len >= bleft)
return rc;
- if (ses->serverOS)
- kfree(ses->serverOS);
+ kfree(ses->serverOS);
ses->serverOS = kzalloc(len + 1, GFP_KERNEL);
if (ses->serverOS)
@@ -289,8 +282,7 @@ static int decode_ascii_ssetup(char **pbcc_area, int bleft,
if (len >= bleft)
return rc;
- if (ses->serverNOS)
- kfree(ses->serverNOS);
+ kfree(ses->serverNOS);
ses->serverNOS = kzalloc(len + 1, GFP_KERNEL);
if (ses->serverNOS)
@@ -479,7 +471,8 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
if (ses->capabilities & CAP_UNICODE) {
if (iov[0].iov_len % 2) {
*bcc_ptr = 0;
- } bcc_ptr++;
+ bcc_ptr++;
+ }
unicode_ssetup_strings(&bcc_ptr, ses, nls_cp);
} else
ascii_ssetup_strings(&bcc_ptr, ses, nls_cp);
OpenPOWER on IntegriCloud