cifs.upcall: fix calloc() argument order in main()
Subsystems (2)
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.
Reported-by Steve French <[email protected]>
Signed-off-by ChenXiaoSong <[email protected]>
--- cifs.upcall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
cifs.upcall.c +1 -1
@@ -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