From 210cab9bf0a72b670d20ea16f1f483e41b5a503c Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 5 Mar 2011 19:02:43 +0100 Subject: s4:partition LDB module - "partition_sequence_number" - remove meaningless "if"s These current partition controls are always added for the two EXOP operations. --- source4/dsdb/samdb/ldb_modules/partition.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'source4/dsdb/samdb') diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c index 6cf670937e..286733119b 100644 --- a/source4/dsdb/samdb/ldb_modules/partition.c +++ b/source4/dsdb/samdb/ldb_modules/partition.c @@ -983,14 +983,12 @@ static int partition_sequence_number(struct ldb_module *module, struct ldb_reque return ret; } - if (!ldb_request_get_control(treq, DSDB_CONTROL_CURRENT_PARTITION_OID)) { - ret = ldb_request_add_control(treq, - DSDB_CONTROL_CURRENT_PARTITION_OID, - false, data->partitions[i]->ctrl); - if (ret != LDB_SUCCESS) { - talloc_free(res); - return ret; - } + ret = ldb_request_add_control(treq, + DSDB_CONTROL_CURRENT_PARTITION_OID, + false, data->partitions[i]->ctrl); + if (ret != LDB_SUCCESS) { + talloc_free(res); + return ret; } ret = partition_request(data->partitions[i]->module, treq); @@ -1086,14 +1084,12 @@ static int partition_sequence_number(struct ldb_module *module, struct ldb_reque return ret; } - if (!ldb_request_get_control(treq, DSDB_CONTROL_CURRENT_PARTITION_OID)) { - ret = ldb_request_add_control(treq, - DSDB_CONTROL_CURRENT_PARTITION_OID, - false, data->partitions[i]->ctrl); - if (ret != LDB_SUCCESS) { - talloc_free(res); - return ret; - } + ret = ldb_request_add_control(treq, + DSDB_CONTROL_CURRENT_PARTITION_OID, + false, data->partitions[i]->ctrl); + if (ret != LDB_SUCCESS) { + talloc_free(res); + return ret; } ret = partition_request(data->partitions[i]->module, treq); -- cgit