diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-10-14 09:25:56 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-10-27 18:52:29 +0200 |
commit | 3fe747538bc79633ed7039c6c001902bacecef04 (patch) | |
tree | 8885519620a05eaa7588c66601e560479953e87e /source4/dsdb/samdb/ldb_modules | |
parent | d95b4c94978fad40b6cb052522aa191fe77c6663 (diff) | |
download | samba-3fe747538bc79633ed7039c6c001902bacecef04.tar.gz samba-3fe747538bc79633ed7039c6c001902bacecef04.tar.bz2 samba-3fe747538bc79633ed7039c6c001902bacecef04.zip |
s4:repl_meta_data LDB module - "dsdb_search_module_dn" already checks if len(res) == 1
No need to perform an additional check here. As a return value we should
always give back the original error code and not generate a new one (to
let the caller know what is going on).
Reviewed-by: abartlet
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index b3126c3e88..090e28fdf5 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -1243,10 +1243,10 @@ static int replmd_update_rpmd(struct ldb_module *module, DSDB_SEARCH_SHOW_DN_IN_STORAGE_FORMAT | DSDB_SEARCH_REVEAL_INTERNALS, req); - if (ret != LDB_SUCCESS || res->count != 1) { + if (ret != LDB_SUCCESS) { DEBUG(0,(__location__ ": Object %s failed to find uSNChanged\n", ldb_dn_get_linearized(msg->dn))); - return LDB_ERR_OPERATIONS_ERROR; + return ret; } objectclass_el = ldb_msg_find_element(res->msgs[0], "objectClass"); @@ -1275,10 +1275,10 @@ static int replmd_update_rpmd(struct ldb_module *module, DSDB_SEARCH_SHOW_EXTENDED_DN | DSDB_SEARCH_SHOW_DN_IN_STORAGE_FORMAT | DSDB_SEARCH_REVEAL_INTERNALS, req); - if (ret != LDB_SUCCESS || res->count != 1) { + if (ret != LDB_SUCCESS) { DEBUG(0,(__location__ ": Object %s failed to find replPropertyMetaData\n", ldb_dn_get_linearized(msg->dn))); - return LDB_ERR_OPERATIONS_ERROR; + return ret; } objectclass_el = ldb_msg_find_element(res->msgs[0], "objectClass"); |