From: Volker Lendecke Date: Sat, 31 Dec 2016 12:45:51 +0000 (+0000) Subject: passdb: Use "all_zero" where appropriate X-Git-Tag: samba-4.6.0rc1~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac389eedece4ed9917cbac8b759b83f2111b3b66;p=thirdparty%2Fsamba.git passdb: Use "all_zero" where appropriate ... Saves a few bytes of footprint Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/passdb/pdb_samba_dsdb.c b/source3/passdb/pdb_samba_dsdb.c index 97806c4af25..97c05c6224e 100644 --- a/source3/passdb/pdb_samba_dsdb.c +++ b/source3/passdb/pdb_samba_dsdb.c @@ -443,10 +443,10 @@ static int pdb_samba_dsdb_replace_by_sam(struct pdb_samba_dsdb_state *state, invalid_history = true; } else { unsigned int i; - static const uint8_t zeros[16]; /* Parse the history into the correct format */ for (i = 0; i < current_hist_len; i++) { - if (memcmp(&history[i*PW_HISTORY_ENTRY_LEN], zeros, 16) != 0) { + if (!all_zero(&history[i*PW_HISTORY_ENTRY_LEN], + 16)) { /* If the history is in the old format, with a salted hash, then we can't migrate it to AD format */ invalid_history = true; break;