Skip to contentSkip to conversation

cifs.upcall: fix calloc() argument order in main()

PATCH New [email protected] 1 participant 1 message Dec 19, 2025

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

PATCH 1/1 cifs.upcall: fix calloc() argument order in main()

From: ChenXiaoSong <[email protected]>

The function prototype of calloc is:
void *calloc (size_t __nmemb, size_t __size)

Fix the argument order to eliminate the build warning.

---
 cifs.upcall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cifs.upcall.c +1 -1
index 69e27a3..08ee101 100644
@@ -1719,7 +1719,7 @@ retry_new_hostname:
 	/* pack SecurityBlob and SessionKey into downcall packet */
 	datalen =
 	    sizeof(struct cifs_spnego_msg) + secblob.length + sess_key.length;
-	keydata = (struct cifs_spnego_msg *)calloc(sizeof(char), datalen);
+	keydata = (struct cifs_spnego_msg *)calloc(datalen, sizeof(char));
 	if (!keydata) {
 		rc = 1;
 		goto out;
Signature · 1 line
2.43.0