From 6a73835b0946a015d1bad0b502c35d92777d2446 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 7 Mar 2006 03:30:59 +0000 Subject: r13909: Make this code clearer. Andrew Bartlett (This used to be commit b89893ab90b50d6b04a6407441fe3e0e4f1688ec) --- source4/dsdb/samdb/ldb_modules/password_hash.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index 414f79ea10..0530c63774 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -561,7 +561,8 @@ static int password_hash_handle(struct ldb_module *module, struct ldb_request *r } /* If the original caller did anything with pwdLastSet then skip this. It could be an incoming samsync */ - if ((attribute = ldb_msg_find_element(msg, "pwdLastSet")) == NULL ) { + attribute = ldb_msg_find_element(msg, "pwdLastSet"); + if (attribute == NULL) { /* Update the password last set time */ unix_to_nt_time(&now_nt, now); CHECK_RET(ldb_msg_add_empty(modify_msg, "pwdLastSet", LDB_FLAG_MOD_REPLACE)); @@ -569,7 +570,8 @@ static int password_hash_handle(struct ldb_module *module, struct ldb_request *r } /* If the original caller did anything with "msDS-KeyVersionNumber" then skip this. It could be an incoming samsync */ - if ((attribute = ldb_msg_find_element(msg, "msDS-KeyVersionNumber")) == NULL ) { + attribute = ldb_msg_find_element(msg, "msDS-KeyVersionNumber"); + if (attribute == NULL) { if (kvno == 0) { CHECK_RET(ldb_msg_add_empty(modify_msg, "msDS-KeyVersionNumber", LDB_FLAG_MOD_REPLACE)); -- cgit