git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90b6e41
)
s3 wbinfo: Avoid ADD_TO_ARRAY macro.
author
Kai Blin
<kai@samba.org>
Wed, 12 Aug 2009 14:18:54 +0000
(16:18 +0200)
committer
Kai Blin
<kai@samba.org>
Tue, 18 Aug 2009 17:53:39 +0000
(19:53 +0200)
nsswitch/wbinfo.c
patch
|
blob
|
history
diff --git
a/nsswitch/wbinfo.c
b/nsswitch/wbinfo.c
index 854dbbd516f9bad2e68604b5be825abc8dca3ca5..3cd5a29e60adbbae36a81bd869e0214b10a992c5 100644
(file)
--- 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) {