From b6ea2ece0929b875582d1cae184f9cf00abb5742 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Wed, 12 Aug 2009 16:18:54 +0200 Subject: s3 wbinfo: Avoid ADD_TO_ARRAY macro. --- nsswitch/wbinfo.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'nsswitch') 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) { -- cgit