Skip to contentSkip to conversation

cifs: arrays are never NULL

PATCH New Dan Carpenter 1 participant 1 message Jul 28, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: arrays are never NULL

It causes a static analysis warning when check to see if an array is NULL. I have removed the check.

---
Or perhaps the intent was to check

	} else if (strlen(ses->serverName)) {

I am not very familiar with this code.

fs/cifs/cifsencrypt.c +1 -1
index bb84d7c..16f4908 100644
@@ -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);