summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2020-02-24 13:28:56 +1300
committerAndrew Bartlett <abartlet@samba.org>2020-02-28 03:08:46 +0000
commit7ad56d41740d6794a85889f268654564c48c8a74 (patch)
treeedb8439f408e3a64c5d903d26072d11a281b7ed9
parentf2a2b469b4d3378102d6011e80b0c6532d802953 (diff)
downloadsamba-7ad56d41740d6794a85889f268654564c48c8a74.tar.gz
dsdb: Simplifiy VANISH_LINKS handling: The variable "parent" is always non-NULL
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index a8a61d5df7c..3395e6395ac 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -2829,12 +2829,10 @@ static int replmd_modify_la_delete(struct ldb_module *module,
return ret;
}
- if (parent) {
- vanish_links_ctrl = ldb_request_get_control(parent, DSDB_CONTROL_REPLMD_VANISH_LINKS);
- if (vanish_links_ctrl) {
- vanish_links = true;
- vanish_links_ctrl->critical = false;
- }
+ vanish_links_ctrl = ldb_request_get_control(parent, DSDB_CONTROL_REPLMD_VANISH_LINKS);
+ if (vanish_links_ctrl) {
+ vanish_links = true;
+ vanish_links_ctrl->critical = false;
}
/* we empty out el->values here to avoid damage if we return early. */
@@ -3344,20 +3342,18 @@ static int replmd_modify_handle_linked_attribs(struct ldb_module *module,
continue;
}
if ((schema_attr->linkID & 1) == 1) {
- if (parent) {
- struct ldb_control *ctrl;
+ struct ldb_control *ctrl;
- ctrl = ldb_request_get_control(parent,
- DSDB_CONTROL_REPLMD_VANISH_LINKS);
- if (ctrl != NULL) {
- ctrl->critical = false;
- continue;
- }
- ctrl = ldb_request_get_control(parent,
- DSDB_CONTROL_DBCHECK);
- if (ctrl != NULL) {
- continue;
- }
+ ctrl = ldb_request_get_control(parent,
+ DSDB_CONTROL_REPLMD_VANISH_LINKS);
+ if (ctrl != NULL) {
+ ctrl->critical = false;
+ continue;
+ }
+ ctrl = ldb_request_get_control(parent,
+ DSDB_CONTROL_DBCHECK);
+ if (ctrl != NULL) {
+ continue;
}
/* Odd is for the target. Illegal to modify */