summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-11-11 19:24:08 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-11-12 16:34:14 +1100
commit716bba545729dbb46631bf233c1023576de54926 (patch)
treebf12d0df76f01024c7a4269c3ae8258209c6ffe5
parent87e984f0bd893abd65cf36f74162efed0d4930ca (diff)
downloadsamba-716bba545729dbb46631bf233c1023576de54926.tar.gz
samba-716bba545729dbb46631bf233c1023576de54926.tar.bz2
samba-716bba545729dbb46631bf233c1023576de54926.zip
s4:ldb Change ldb_request_add_control to the normal 'for loop' pattern
-rw-r--r--source4/lib/ldb/common/ldb_controls.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/lib/ldb/common/ldb_controls.c b/source4/lib/ldb/common/ldb_controls.c
index 5276ac091d..82bd34bda5 100644
--- a/source4/lib/ldb/common/ldb_controls.c
+++ b/source4/lib/ldb/common/ldb_controls.c
@@ -168,12 +168,11 @@ int ldb_request_add_control(struct ldb_request *req, const char *oid, bool criti
struct ldb_control **ctrls;
struct ldb_control *ctrl;
- for (n=0; req->controls && req->controls[n];) {
+ for (n=0; req->controls && req->controls[n];n++) {
/* having two controls of the same OID makes no sense */
if (strcmp(oid, req->controls[n]->oid) == 0) {
return LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS;
}
- n++;
}
ctrls = talloc_array(req,