* [patch] cifs: arrays are never NULL
@ 2013-07-28 20:26 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-07-28 20:26 UTC (permalink / raw)
To: Steve French; +Cc: linux-cifs, samba-technical, kernel-janitors
It causes a static analysis warning when check to see if an array is
NULL. I have removed the check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Or perhaps the intent was to check
} else if (strlen(ses->serverName)) {
I am not very familiar with this code.
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index bb84d7c..16f4908 100644
--- a/fs/cifs/cifsencrypt.c
+++ b/fs/cifs/cifsencrypt.c
@@ -514,7 +514,7 @@ static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,
__func__);
return rc;
}
- } else if (ses->serverName) {
+ } else {
len = strlen(ses->serverName);
server = kmalloc(2 + (len * 2), GFP_KERNEL);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-28 20:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-28 20:26 [patch] cifs: arrays are never NULL Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox