From 84abb428f640e4c48a7231ed78383b197ed715a9 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 12 Feb 2011 16:58:10 +0100 Subject: s3: Add an explicit counter to tldap_add_mod_[blobs|str] --- source3/lib/tldap_util.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/tldap_util.c b/source3/lib/tldap_util.c index 2646348aa1..e42188a2ab 100644 --- a/source3/lib/tldap_util.c +++ b/source3/lib/tldap_util.c @@ -132,7 +132,7 @@ static bool tldap_add_blob_vals(TALLOC_CTX *mem_ctx, struct tldap_mod *mod, } bool tldap_add_mod_blobs(TALLOC_CTX *mem_ctx, - struct tldap_mod **pmods, + struct tldap_mod **pmods, int *pnum_mods, int mod_op, const char *attrib, DATA_BLOB *newvals, int num_newvals) { @@ -148,7 +148,7 @@ bool tldap_add_mod_blobs(TALLOC_CTX *mem_ctx, return false; } - num_mods = talloc_array_length(mods); + num_mods = *pnum_mods; for (i=0; i