summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-03-05 19:02:43 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-03-10 11:12:05 +0100
commit210cab9bf0a72b670d20ea16f1f483e41b5a503c (patch)
treeab14a3f0b4b3e9e27606b09465e7f956ffd46c94 /source4
parent96600e5df185c5d3b774870c5339a8fcbf412ff5 (diff)
downloadsamba-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.
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/partition.c28
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);