summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2009-08-12 16:18:54 +0200
committerKai Blin <kai@samba.org>2009-08-18 19:53:39 +0200
commitb6ea2ece0929b875582d1cae184f9cf00abb5742 (patch)
treeda432bf58af4cd58971d20bfe89b3f6115c55bca
parent90b6e41b83cc206935a702f599694fccd0b223c1 (diff)
downloadsamba-b6ea2ece0929b875582d1cae184f9cf00abb5742.tar.gz
samba-b6ea2ece0929b875582d1cae184f9cf00abb5742.tar.bz2
samba-b6ea2ece0929b875582d1cae184f9cf00abb5742.zip
s3 wbinfo: Avoid ADD_TO_ARRAY macro.
-rw-r--r--nsswitch/wbinfo.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index 854dbbd516..3cd5a29e60 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -1076,7 +1076,12 @@ static bool wbinfo_lookuprids(const char *domain, const char *arg)
while (next_token_talloc(mem_ctx, &p, &ridstr, " ,\n")) {
uint32_t rid = strtoul(ridstr, NULL, 10);
- ADD_TO_ARRAY(mem_ctx, uint32_t, rid, &rids, &num_rids);
+ rids = talloc_realloc(mem_ctx, rids, uint32_t, num_rids + 1);
+ if (rids == NULL) {
+ d_printf("talloc_realloc failed\n");
+ }
+ rids[num_rids] = rid;
+ num_rids += 1;
}
if (rids == NULL) {