]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
cifs: remove useless memset in LANMAN auth code
authorJeff Layton <jlayton@redhat.com>
Fri, 24 May 2013 11:41:00 +0000 (07:41 -0400)
committerSteve French <sfrench@us.ibm.com>
Fri, 24 May 2013 18:26:41 +0000 (13:26 -0500)
It turns out that CIFS_SESS_KEY_SIZE == CIFS_ENCPWD_SIZE, so this
memset doesn't do anything useful.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifsencrypt.c

index 71436d1fca13bede14a8a25ac6a9ae126e80dede..a85a83d1d00fe3008213830b0059b47da81b19a6 100644 (file)
@@ -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;