From: Volker Lendecke Date: Sat, 31 Dec 2016 12:45:51 +0000 (+0000) Subject: auth4: Use "all_zero" where appropriate X-Git-Tag: samba-4.6.0rc1~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efb5f38f1f03d3f1326a8fa115d19101c41db95a;p=thirdparty%2Fsamba.git auth4: Use "all_zero" where appropriate ... Saves a few bytes of footprint Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source4/auth/ntlm/auth_sam.c b/source4/auth/ntlm/auth_sam.c index 449819329d0..90eabcaf506 100644 --- a/source4/auth/ntlm/auth_sam.c +++ b/source4/auth/ntlm/auth_sam.c @@ -289,7 +289,6 @@ static NTSTATUS authsam_password_check_and_record(struct auth4_context *auth_con } for (i = 1; i < MIN(history_len, 3); i++) { - static const struct samr_Password zero_hash; struct samr_Password zero_string_hash; struct samr_Password zero_string_des_hash; struct samr_Password *nt_history_pwd = NULL; @@ -328,8 +327,8 @@ static NTSTATUS authsam_password_check_and_record(struct auth4_context *auth_con } /* Skip over all-zero hashes in the history */ - if (memcmp(nt_history_pwd->hash, zero_hash.hash, - sizeof(zero_hash.hash)) == 0) { + if (all_zero(nt_history_pwd->hash, + sizeof(nt_history_pwd->hash))) { continue; }