1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

dsdb: Remove redundant variable/check

Previously, this code used to live inside the loop, so the
checked_reveal_control was needed to save ourselves unnecessary work.

However, now that the code has been moved outside the loop, the
checked_reveal_control variable is just unnecessary complication.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
Tim Beale 2018-09-28 14:55:14 +12:00 committed by Douglas Bagnall
parent 4092b369ae
commit 24669e57fc

View File

@ -402,7 +402,7 @@ static int extended_callback(struct ldb_request *req, struct ldb_reply *ares,
struct ldb_message *msg;
struct extended_dn_out_private *p;
struct ldb_context *ldb;
bool have_reveal_control=false, checked_reveal_control=false;
bool have_reveal_control=false;
ac = talloc_get_type(req->context, struct extended_search_context);
p = talloc_get_type(ldb_module_get_private(ac->module), struct extended_dn_out_private);
@ -473,11 +473,9 @@ static int extended_callback(struct ldb_request *req, struct ldb_reply *ares,
}
}
if (!checked_reveal_control) {
have_reveal_control =
ldb_request_get_control(req, LDB_CONTROL_REVEAL_INTERNALS) != NULL;
checked_reveal_control = true;
}
have_reveal_control =
ldb_request_get_control(req,
LDB_CONTROL_REVEAL_INTERNALS) != NULL;
/*
* Shortcut for repl_meta_data. We asked for the data