summaryrefslogtreecommitdiff
path: root/source3/lib/tldap_util.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-02-12 16:33:26 +0100
committerVolker Lendecke <vl@samba.org>2011-02-13 12:11:52 +0100
commit6b492a1741b8bdcfc61e5fded36e818fa7795b76 (patch)
treeb2857623f3d6550a5997cd7083cee2e067248fe2 /source3/lib/tldap_util.c
parent78525270733a79a6e2def662d7340382cb648414 (diff)
downloadsamba-6b492a1741b8bdcfc61e5fded36e818fa7795b76.tar.gz
samba-6b492a1741b8bdcfc61e5fded36e818fa7795b76.tar.bz2
samba-6b492a1741b8bdcfc61e5fded36e818fa7795b76.zip
s3: Convert tldap_add_mod_blobs args to "array, count"
Diffstat (limited to 'source3/lib/tldap_util.c')
-rw-r--r--source3/lib/tldap_util.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/lib/tldap_util.c b/source3/lib/tldap_util.c
index 7f1e916338..f46cfc834d 100644
--- a/source3/lib/tldap_util.c
+++ b/source3/lib/tldap_util.c
@@ -131,9 +131,10 @@ static bool tldap_add_blob_vals(TALLOC_CTX *mem_ctx, struct tldap_mod *mod,
return true;
}
-bool tldap_add_mod_blobs(TALLOC_CTX *mem_ctx, struct tldap_mod **pmods,
+bool tldap_add_mod_blobs(TALLOC_CTX *mem_ctx,
+ struct tldap_mod **pmods,
int mod_op, const char *attrib,
- int num_newvals, DATA_BLOB *newvals)
+ DATA_BLOB *newvals, int num_newvals)
{
struct tldap_mod new_mod;
struct tldap_mod *mods = *pmods;
@@ -198,7 +199,7 @@ bool tldap_add_mod_str(TALLOC_CTX *mem_ctx, struct tldap_mod **pmods,
return false;
}
- ret = tldap_add_mod_blobs(mem_ctx, pmods, mod_op, attrib, 1, &utf8);
+ ret = tldap_add_mod_blobs(mem_ctx, pmods, mod_op, attrib, &utf8, 1);
TALLOC_FREE(utf8.data);
return ret;
}
@@ -248,7 +249,7 @@ static bool tldap_make_mod_blob_int(struct tldap_message *existing,
DEBUG(10, ("smbldap_make_mod_blob: deleting attribute |%s|\n",
attrib));
if (!tldap_add_mod_blobs(mem_ctx, pmods, TLDAP_MOD_DELETE,
- attrib, 1, &oldval)) {
+ attrib, &oldval, 1)) {
return false;
}
}
@@ -261,7 +262,7 @@ static bool tldap_make_mod_blob_int(struct tldap_message *existing,
DEBUG(10, ("smbldap_make_mod: adding attribute |%s| value len "
"%d\n", attrib, (int)newval.length));
if (!tldap_add_mod_blobs(mem_ctx, pmods, TLDAP_MOD_ADD,
- attrib, 1, &newval)) {
+ attrib, &newval, 1)) {
return false;
}
}