summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-07 11:30:12 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-09 12:40:08 +0200
commit3d15137653a7d1b593a9af2eef12f6e5b9a04c4f (patch)
tree325ef987dfbb77144bcb7753c4936cbc8d05379b /source3/libsmb
parent73b377432c5efb8451f09f6d25d8aa1b28c239c9 (diff)
downloadsamba-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/libsmb')
-rw-r--r--source3/libsmb/clifile.c2
-rw-r--r--source3/libsmb/clilist.c4
-rw-r--r--source3/libsmb/clirap.c2
-rw-r--r--source3/libsmb/clireadwrite.c2
-rw-r--r--source3/libsmb/clitrans.c2
-rw-r--r--source3/libsmb/libsmb_path.c2
-rw-r--r--source3/libsmb/namequery.c6
7 files changed, 10 insertions, 10 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 8b76e8f5d8..ad5685361b 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -3998,7 +3998,7 @@ static bool parse_ea_blob(TALLOC_CTX *ctx, const uint8_t *rdata,
return true;
}
- ea_list = TALLOC_ARRAY(ctx, struct ea_struct, num_eas);
+ ea_list = talloc_array(ctx, struct ea_struct, num_eas);
if (!ea_list) {
return false;
}
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index 83cc81549a..9eec97fbeb 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -452,7 +452,7 @@ static NTSTATUS cli_list_old_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
num_received = talloc_array_length(state->dirlist) / DIR_STRUCT_SIZE;
- finfo = TALLOC_ARRAY(mem_ctx, struct file_info, num_received);
+ finfo = talloc_array(mem_ctx, struct file_info, num_received);
if (finfo == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -573,7 +573,7 @@ static struct tevent_req *cli_list_trans_send(TALLOC_CTX *mem_ctx,
state->setup[0] = TRANSACT2_FINDFIRST;
nlen = 2*(strlen(mask)+1);
- state->param = TALLOC_ARRAY(state, uint8_t, 12+nlen+2);
+ state->param = talloc_array(state, uint8_t, 12+nlen+2);
if (tevent_req_nomem(state->param, req)) {
return tevent_req_post(req, ev);
}
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index 008db0b65a..e5ff1abc18 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -1023,7 +1023,7 @@ static bool parse_streams_blob(TALLOC_CTX *mem_ctx, const uint8_t *rdata,
* convert_string_talloc??
*/
- tmp_buf = TALLOC_ARRAY(streams, uint8_t, nlen+2);
+ tmp_buf = talloc_array(streams, uint8_t, nlen+2);
if (tmp_buf == NULL) {
goto fail;
}
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index fc6c9ffc00..223309f756 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -704,7 +704,7 @@ NTSTATUS cli_smbwrite(struct cli_state *cli, uint16_t fnum, char *buf,
* 3 bytes prefix
*/
- bytes = TALLOC_ARRAY(talloc_tos(), uint8_t, 3);
+ bytes = talloc_array(talloc_tos(), uint8_t, 3);
if (bytes == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c
index 44dafa7e43..99a358f81f 100644
--- a/source3/libsmb/clitrans.c
+++ b/source3/libsmb/clitrans.c
@@ -148,7 +148,7 @@ static NTSTATUS cli_trans_pull_blob(TALLOC_CTX *mem_ctx,
return NT_STATUS_INVALID_NETWORK_RESPONSE;
}
blob->total = total;
- blob->data = TALLOC_ARRAY(mem_ctx, uint8_t, total);
+ blob->data = talloc_array(mem_ctx, uint8_t, total);
if (blob->data == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/libsmb/libsmb_path.c b/source3/libsmb/libsmb_path.c
index 64a956d9ee..1dcf2dd516 100644
--- a/source3/libsmb/libsmb_path.c
+++ b/source3/libsmb/libsmb_path.c
@@ -88,7 +88,7 @@ urldecode_talloc(TALLOC_CTX *ctx, char **pp_dest, const char *src)
newlen++;
}
- dest = TALLOC_ARRAY(ctx, char, newlen);
+ dest = talloc_array(ctx, char, newlen);
if (!dest) {
return err_count;
}
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index eec42ff622..f5f4a7c1dc 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -237,7 +237,7 @@ static struct node_status *parse_node_status(TALLOC_CTX *mem_ctx, char *p,
if (*num_names == 0)
return NULL;
- ret = TALLOC_ARRAY(mem_ctx, struct node_status,*num_names);
+ ret = talloc_array(mem_ctx, struct node_status,*num_names);
if (!ret)
return NULL;
@@ -1117,7 +1117,7 @@ static int remove_duplicate_addrs2(struct ip_service *iplist, int count )
static bool prioritize_ipv4_list(struct ip_service *iplist, int count)
{
TALLOC_CTX *frame = talloc_stackframe();
- struct ip_service *iplist_new = TALLOC_ARRAY(frame, struct ip_service, count);
+ struct ip_service *iplist_new = talloc_array(frame, struct ip_service, count);
int i, j;
if (iplist_new == NULL) {
@@ -2514,7 +2514,7 @@ NTSTATUS resolve_name_list(TALLOC_CTX *ctx,
return NT_STATUS_BAD_NETWORK_NAME;
}
- *return_ss_arr = TALLOC_ARRAY(ctx,
+ *return_ss_arr = talloc_array(ctx,
struct sockaddr_storage,
num_entries);
if (!(*return_ss_arr)) {