1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

auth4: Use "all_zero" where appropriate

... Saves a few bytes of footprint

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Volker Lendecke 2016-12-31 12:45:51 +00:00 committed by Ralph Boehme
parent a4bc275d94
commit efb5f38f1f

View File

@ -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;
}