summaryrefslogtreecommitdiff
path: root/source3/lib/netapi
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-07 11:58:39 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-09 12:40:08 +0200
commit5e26e94092b56ee47e7ec7837f7cd0feb3fb0119 (patch)
treec63b385bc035e4e13d3cfb0e7063d8e8573cfdd0 /source3/lib/netapi
parentad0a07c531fadd1639c5298951cfaf5cfe0cb10e (diff)
downloadsamba-5e26e94092b56ee47e7ec7837f7cd0feb3fb0119.tar.gz
s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_ARRAY isn't standard talloc.
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r--source3/lib/netapi/cm.c2
-rw-r--r--source3/lib/netapi/group.c8
-rw-r--r--source3/lib/netapi/localgroup.c2
-rw-r--r--source3/lib/netapi/user.c6
4 files changed, 9 insertions, 9 deletions
diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c
index 3adb97e3575..47ccf8bb7a3 100644
--- a/source3/lib/netapi/cm.c
+++ b/source3/lib/netapi/cm.c
@@ -188,7 +188,7 @@ static NTSTATUS pipe_cm_connect(TALLOC_CTX *mem_ctx,
struct client_pipe_connection *p;
NTSTATUS status;
- p = TALLOC_ZERO_ARRAY(mem_ctx, struct client_pipe_connection, 1);
+ p = talloc_zero_array(mem_ctx, struct client_pipe_connection, 1);
if (!p) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c
index 4295d9f7bbf..710ec3790f2 100644
--- a/source3/lib/netapi/group.c
+++ b/source3/lib/netapi/group.c
@@ -1157,7 +1157,7 @@ static WERROR convert_samr_disp_groups_to_GROUP_INFO_0_buffer(TALLOC_CTX *mem_ct
struct GROUP_INFO_0 *g0;
int i;
- g0 = TALLOC_ZERO_ARRAY(mem_ctx, struct GROUP_INFO_0, groups->count);
+ g0 = talloc_zero_array(mem_ctx, struct GROUP_INFO_0, groups->count);
W_ERROR_HAVE_NO_MEMORY(g0);
for (i=0; i<groups->count; i++) {
@@ -1183,7 +1183,7 @@ static WERROR convert_samr_disp_groups_to_GROUP_INFO_1_buffer(TALLOC_CTX *mem_ct
struct GROUP_INFO_1 *g1;
int i;
- g1 = TALLOC_ZERO_ARRAY(mem_ctx, struct GROUP_INFO_1, groups->count);
+ g1 = talloc_zero_array(mem_ctx, struct GROUP_INFO_1, groups->count);
W_ERROR_HAVE_NO_MEMORY(g1);
for (i=0; i<groups->count; i++) {
@@ -1211,7 +1211,7 @@ static WERROR convert_samr_disp_groups_to_GROUP_INFO_2_buffer(TALLOC_CTX *mem_ct
struct GROUP_INFO_2 *g2;
int i;
- g2 = TALLOC_ZERO_ARRAY(mem_ctx, struct GROUP_INFO_2, groups->count);
+ g2 = talloc_zero_array(mem_ctx, struct GROUP_INFO_2, groups->count);
W_ERROR_HAVE_NO_MEMORY(g2);
for (i=0; i<groups->count; i++) {
@@ -1242,7 +1242,7 @@ static WERROR convert_samr_disp_groups_to_GROUP_INFO_3_buffer(TALLOC_CTX *mem_ct
struct GROUP_INFO_3 *g3;
int i;
- g3 = TALLOC_ZERO_ARRAY(mem_ctx, struct GROUP_INFO_3, groups->count);
+ g3 = talloc_zero_array(mem_ctx, struct GROUP_INFO_3, groups->count);
W_ERROR_HAVE_NO_MEMORY(g3);
for (i=0; i<groups->count; i++) {
diff --git a/source3/lib/netapi/localgroup.c b/source3/lib/netapi/localgroup.c
index 54ec14eb84d..816afc230ff 100644
--- a/source3/lib/netapi/localgroup.c
+++ b/source3/lib/netapi/localgroup.c
@@ -1115,7 +1115,7 @@ static WERROR NetLocalGroupModifyMembers_r(struct libnetapi_ctx *ctx,
ZERO_STRUCT(domain_handle);
ZERO_STRUCT(alias_handle);
- member_sids = TALLOC_ZERO_ARRAY(ctx, struct dom_sid,
+ member_sids = talloc_zero_array(ctx, struct dom_sid,
r->in.total_entries);
W_ERROR_HAVE_NO_MEMORY(member_sids);
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index f1182100c70..3003a393971 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -1436,7 +1436,7 @@ static WERROR convert_samr_dispinfo_to_NET_DISPLAY_USER(TALLOC_CTX *mem_ctx,
struct NET_DISPLAY_USER *user = NULL;
int i;
- user = TALLOC_ZERO_ARRAY(mem_ctx,
+ user = talloc_zero_array(mem_ctx,
struct NET_DISPLAY_USER,
info->count);
W_ERROR_HAVE_NO_MEMORY(user);
@@ -1480,7 +1480,7 @@ static WERROR convert_samr_dispinfo_to_NET_DISPLAY_MACHINE(TALLOC_CTX *mem_ctx,
struct NET_DISPLAY_MACHINE *machine = NULL;
int i;
- machine = TALLOC_ZERO_ARRAY(mem_ctx,
+ machine = talloc_zero_array(mem_ctx,
struct NET_DISPLAY_MACHINE,
info->count);
W_ERROR_HAVE_NO_MEMORY(machine);
@@ -1522,7 +1522,7 @@ static WERROR convert_samr_dispinfo_to_NET_DISPLAY_GROUP(TALLOC_CTX *mem_ctx,
struct NET_DISPLAY_GROUP *group = NULL;
int i;
- group = TALLOC_ZERO_ARRAY(mem_ctx,
+ group = talloc_zero_array(mem_ctx,
struct NET_DISPLAY_GROUP,
info->count);
W_ERROR_HAVE_NO_MEMORY(group);