From: Jeff Layton Date: Fri, 24 May 2013 11:41:00 +0000 (-0400) Subject: cifs: remove useless memset in LANMAN auth code X-Git-Tag: next-20130527~81^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6066ab9f895a91f32d727d74c5048d255cc00492;p=karo-tx-linux.git cifs: remove useless memset in LANMAN auth code It turns out that CIFS_SESS_KEY_SIZE == CIFS_ENCPWD_SIZE, so this memset doesn't do anything useful. Signed-off-by: Jeff Layton Acked-by: Pavel Shilovsky Signed-off-by: Steve French --- diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index 71436d1fca13..a85a83d1d00f 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c @@ -276,7 +276,6 @@ int calc_lanman_hash(const char *password, const char *cryptkey, bool encrypt, strncpy(password_with_pad, password, CIFS_ENCPWD_SIZE); if (!encrypt && global_secflags & CIFSSEC_MAY_PLNTXT) { - memset(lnm_session_key, 0, CIFS_SESS_KEY_SIZE); memcpy(lnm_session_key, password_with_pad, CIFS_ENCPWD_SIZE); return 0;