[patch] cifs: arrays are never NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
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);
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux