diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-07 11:30:12 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-09 12:40:08 +0200 |
commit | 3d15137653a7d1b593a9af2eef12f6e5b9a04c4f (patch) | |
tree | 325ef987dfbb77144bcb7753c4936cbc8d05379b /source3/utils | |
parent | 73b377432c5efb8451f09f6d25d8aa1b28c239c9 (diff) | |
download | samba-3d15137653a7d1b593a9af2eef12f6e5b9a04c4f.tar.gz samba-3d15137653a7d1b593a9af2eef12f6e5b9a04c4f.tar.bz2 samba-3d15137653a7d1b593a9af2eef12f6e5b9a04c4f.zip |
s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/eventlogadm.c | 2 | ||||
-rw-r--r-- | source3/utils/net_rpc_registry.c | 8 | ||||
-rw-r--r-- | source3/utils/net_rpc_rights.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source3/utils/eventlogadm.c b/source3/utils/eventlogadm.c index a157e91e5c..d170604a1b 100644 --- a/source3/utils/eventlogadm.c +++ b/source3/utils/eventlogadm.c @@ -171,7 +171,7 @@ static bool eventlog_add_source( const char *eventlog, const char *sourcename, if ( !already_in ) { /* make a new list with an additional entry; copy values, add another */ - wp = TALLOC_ARRAY(ctx, const char *, numsources + 2 ); + wp = talloc_array(ctx, const char *, numsources + 2 ); if ( !wp ) { d_printf("talloc() failed \n"); diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index 20a6bdaa24..77b15a45c7 100644 --- a/source3/utils/net_rpc_registry.c +++ b/source3/utils/net_rpc_registry.c @@ -333,8 +333,8 @@ static NTSTATUS registry_enumvalues(TALLOC_CTX *ctx, return NT_STATUS_OK; } - if ((!(names = TALLOC_ARRAY(mem_ctx, char *, num_values))) || - (!(values = TALLOC_ARRAY(mem_ctx, struct registry_value *, + if ((!(names = talloc_array(mem_ctx, char *, num_values))) || + (!(values = talloc_array(mem_ctx, struct registry_value *, num_values)))) { status = NT_STATUS_NO_MEMORY; goto error; @@ -456,8 +456,8 @@ static NTSTATUS registry_enumvalues2(TALLOC_CTX *ctx, return NT_STATUS_OK; } - if ((!(names = TALLOC_ARRAY(mem_ctx, char *, num_values))) || - (!(values = TALLOC_ARRAY(mem_ctx, struct regval_blob *, + if ((!(names = talloc_array(mem_ctx, char *, num_values))) || + (!(values = talloc_array(mem_ctx, struct regval_blob *, num_values)))) { status = NT_STATUS_NO_MEMORY; goto error; diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c index 1b99afa54e..737bfb0e86 100644 --- a/source3/utils/net_rpc_rights.c +++ b/source3/utils/net_rpc_rights.c @@ -506,7 +506,7 @@ static NTSTATUS rpc_rights_grant_internal(struct net_context *c, return status; rights.count = argc-1; - rights.names = TALLOC_ARRAY(mem_ctx, struct lsa_StringLarge, + rights.names = talloc_array(mem_ctx, struct lsa_StringLarge, rights.count); if (!rights.names) { return NT_STATUS_NO_MEMORY; @@ -579,7 +579,7 @@ static NTSTATUS rpc_rights_revoke_internal(struct net_context *c, return status; rights.count = argc-1; - rights.names = TALLOC_ARRAY(mem_ctx, struct lsa_StringLarge, + rights.names = talloc_array(mem_ctx, struct lsa_StringLarge, rights.count); if (!rights.names) { return NT_STATUS_NO_MEMORY; |