diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-03-05 19:02:43 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-03-10 11:12:05 +0100 |
commit | 210cab9bf0a72b670d20ea16f1f483e41b5a503c (patch) | |
tree | ab14a3f0b4b3e9e27606b09465e7f956ffd46c94 | |
parent | 96600e5df185c5d3b774870c5339a8fcbf412ff5 (diff) | |
download | samba-210cab9bf0a72b670d20ea16f1f483e41b5a503c.tar.gz samba-210cab9bf0a72b670d20ea16f1f483e41b5a503c.tar.bz2 samba-210cab9bf0a72b670d20ea16f1f483e41b5a503c.zip |
s4:partition LDB module - "partition_sequence_number" - remove meaningless "if"s
These current partition controls are always added for the two EXOP operations.
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/partition.c | 28 |
1 files changed, 12 insertions, 16 deletions
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); |