diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-03-07 03:30:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:52:22 -0500 |
commit | 6a73835b0946a015d1bad0b502c35d92777d2446 (patch) | |
tree | 073aa43e2b1ce3e5be4af79cc531730b44fbe957 /source4/dsdb/samdb/ldb_modules | |
parent | 4d024e6e64d34491f99d91485ed375d0632df31a (diff) | |
download | samba-6a73835b0946a015d1bad0b502c35d92777d2446.tar.gz samba-6a73835b0946a015d1bad0b502c35d92777d2446.tar.bz2 samba-6a73835b0946a015d1bad0b502c35d92777d2446.zip |
r13909: Make this code clearer.
Andrew Bartlett
(This used to be commit b89893ab90b50d6b04a6407441fe3e0e4f1688ec)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/password_hash.c | 6 |
1 files changed, 4 insertions, 2 deletions
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)); |