Skip to content

Commit 59edb63

Browse files
Steve Frenchsmfrench
authored andcommitted
cifs: Fix sparse warning when calling cifs_strtoUCS
Fix sparse endian check warning while calling cifs_strtoUCS CHECK fs/cifs/smbencrypt.c fs/cifs/smbencrypt.c:216:37: warning: incorrect type in argument 1 (different base types) fs/cifs/smbencrypt.c:216:37: expected restricted __le16 [usertype] *<noident> fs/cifs/smbencrypt.c:216:37: got unsigned short *<noident> Signed-off-by: Steve French <[email protected]> Acked-by: Shirish Pargaonkar <[email protected]
1 parent 9a5101c commit 59edb63

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/cifs/smbencrypt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ E_md4hash(const unsigned char *passwd, unsigned char *p16,
209209
{
210210
int rc;
211211
int len;
212-
__u16 wpwd[129];
212+
__le16 wpwd[129];
213213

214214
/* Password cannot be longer than 128 characters */
215215
if (passwd) /* Password must be converted to NT unicode */
@@ -219,8 +219,8 @@ E_md4hash(const unsigned char *passwd, unsigned char *p16,
219219
*wpwd = 0; /* Ensure string is null terminated */
220220
}
221221

222-
rc = mdfour(p16, (unsigned char *) wpwd, len * sizeof(__u16));
223-
memset(wpwd, 0, 129 * sizeof(__u16));
222+
rc = mdfour(p16, (unsigned char *) wpwd, len * sizeof(__le16));
223+
memset(wpwd, 0, 129 * sizeof(__le16));
224224

225225
return rc;
226226
}

0 commit comments

Comments
 (0)