diff options
author | Jeremy Allison <jra@samba.org> | 2007-04-27 23:18:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:44 -0500 |
commit | 12ba88574bf91bdcc4447bfc3d429b799064bfd9 (patch) | |
tree | 17f9b68292eb277da8c71871f8cad332c43d3a5a /source3/rpc_server | |
parent | fdc0b87083496ae9d6d9d3d1d1a71dddaca24da2 (diff) | |
download | samba-12ba88574bf91bdcc4447bfc3d429b799064bfd9.tar.gz samba-12ba88574bf91bdcc4447bfc3d429b799064bfd9.tar.bz2 samba-12ba88574bf91bdcc4447bfc3d429b799064bfd9.zip |
r22542: Move over to using the _strict varients of the talloc
calls. No functional changes. Looks bigger than it is :-).
Jeremy.
(This used to be commit f6fa3080fee1b20df9f1968500840a88cf0ee592)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_echo_nt.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_srvsvc_nt.c | 36 |
4 files changed, 21 insertions, 21 deletions
diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c index eb095f6bfe..58ab51e2b0 100644 --- a/source3/rpc_server/srv_echo_nt.c +++ b/source3/rpc_server/srv_echo_nt.c @@ -120,7 +120,7 @@ void _echo_TestEnum(pipes_struct *p, struct echo_TestEnum *r) void _echo_TestSurrounding(pipes_struct *p, struct echo_TestSurrounding *r) { r->out.data->x *= 2; - r->out.data->surrounding = talloc_zero_array(p->mem_ctx, uint16_t, r->in.data->x); + r->out.data->surrounding = TALLOC_ZERO_ARRAY(p->mem_ctx, uint16_t, r->in.data->x); } uint16 _echo_TestDoublePointer(pipes_struct *p, struct echo_TestDoublePointer *r) diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index a128757ad0..80b1b93a50 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -854,7 +854,7 @@ static NTSTATUS make_user_sam_entry_list(TALLOC_CTX *ctx, SAM_ENTRY **sam_pp, uni_name = TALLOC_ZERO_ARRAY(ctx, UNISTR2, num_entries); if (sam == NULL || uni_name == NULL) { - DEBUG(0, ("make_user_sam_entry_list: talloc_zero failed!\n")); + DEBUG(0, ("make_user_sam_entry_list: TALLOC_ZERO failed!\n")); return NT_STATUS_NO_MEMORY; } diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 3e1c1a2408..beb3b5aef0 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -9504,7 +9504,7 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ if ( data_len ) { if ( !(enum_values[i].data = (uint8 *)TALLOC_MEMDUP(p->mem_ctx, regval_data_p(val), data_len)) ) { - DEBUG(0,("talloc_memdup failed to allocate memory [data_len=%d] for data!\n", + DEBUG(0,("TALLOC_MEMDUP failed to allocate memory [data_len=%d] for data!\n", data_len )); result = WERR_NOMEM; goto done; diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index 615f5e1b07..8f68bf36a1 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -544,61 +544,61 @@ static WERROR init_srv_share_info_ctr(pipes_struct *p, switch (info_level) { case 0: - if (!(ctr->ctr0 = talloc_zero( + if (!(ctr->ctr0 = TALLOC_ZERO_P( p->mem_ctx, struct srvsvc_NetShareCtr0))) { goto done; } break; case 1: - if (!(ctr->ctr1 = talloc_zero( + if (!(ctr->ctr1 = TALLOC_ZERO_P( p->mem_ctx, struct srvsvc_NetShareCtr1))) { goto done; } break; case 2: - if (!(ctr->ctr2 = talloc_zero( + if (!(ctr->ctr2 = TALLOC_ZERO_P( p->mem_ctx, struct srvsvc_NetShareCtr2))) { goto done; } break; case 501: - if (!(ctr->ctr501 = talloc_zero( + if (!(ctr->ctr501 = TALLOC_ZERO_P( p->mem_ctx, struct srvsvc_NetShareCtr501))) { goto done; } break; case 502: - if (!(ctr->ctr502 = talloc_zero( + if (!(ctr->ctr502 = TALLOC_ZERO_P( p->mem_ctx, struct srvsvc_NetShareCtr502))) { goto done; } break; case 1004: - if (!(ctr->ctr1004 = talloc_zero( + if (!(ctr->ctr1004 = TALLOC_ZERO_P( p->mem_ctx, struct srvsvc_NetShareCtr1004))) { goto done; } break; case 1005: - if (!(ctr->ctr1005 = talloc_zero( + if (!(ctr->ctr1005 = TALLOC_ZERO_P( p->mem_ctx, struct srvsvc_NetShareCtr1005))) { goto done; } break; case 1006: - if (!(ctr->ctr1006 = talloc_zero( + if (!(ctr->ctr1006 = TALLOC_ZERO_P( p->mem_ctx, struct srvsvc_NetShareCtr1006))) { goto done; } break; case 1007: - if (!(ctr->ctr1007 = talloc_zero( + if (!(ctr->ctr1007 = TALLOC_ZERO_P( p->mem_ctx, struct srvsvc_NetShareCtr1007))) { goto done; } break; case 1501: - if (!(ctr->ctr1501 = talloc_zero( + if (!(ctr->ctr1501 = TALLOC_ZERO_P( p->mem_ctx, struct srvsvc_NetShareCtr1501))) { goto done; } @@ -781,7 +781,7 @@ static void init_srv_sess_info_0(pipes_struct *p, struct srvsvc_NetSessCtr0 *ss0 DEBUG(5,("init_srv_sess_0_ss0\n")); - ss0->array = talloc_array(p->mem_ctx, struct srvsvc_NetSessInfo0, *stot); + ss0->array = TALLOC_ARRAY(p->mem_ctx, struct srvsvc_NetSessInfo0, *stot); if (snum) { for (; (*snum) < (*stot); (*snum)++) { @@ -861,7 +861,7 @@ static void init_srv_sess_info_1(pipes_struct *p, struct srvsvc_NetSessCtr1 *ss1 (*stot) = list_sessions(&session_list); - ss1->array = talloc_array(p->mem_ctx, struct srvsvc_NetSessInfo1, *stot); + ss1->array = TALLOC_ARRAY(p->mem_ctx, struct srvsvc_NetSessInfo1, *stot); for (; (*snum) < (*stot); (*snum)++) { uint32 num_files; @@ -954,7 +954,7 @@ static void init_srv_conn_info_0(pipes_struct *p, struct srvsvc_NetConnCtr0 *ss0 DEBUG(5,("init_srv_conn_0_ss0\n")); if (snum) { - ss0->array = talloc_array(p->mem_ctx, struct srvsvc_NetConnInfo0, *stot); + ss0->array = TALLOC_ARRAY(p->mem_ctx, struct srvsvc_NetConnInfo0, *stot); for (; (*snum) < (*stot); (*snum)++) { ss0->array[num_entries].conn_id = (*stot); @@ -996,7 +996,7 @@ static void init_srv_conn_info_1(pipes_struct *p, struct srvsvc_NetConnCtr1 *ss1 DEBUG(5,("init_srv_conn_1_ss1\n")); if (snum) { - ss1->array = talloc_array(p->mem_ctx, struct srvsvc_NetConnInfo1, *stot); + ss1->array = TALLOC_ARRAY(p->mem_ctx, struct srvsvc_NetConnInfo1, *stot); for (; (*snum) < (*stot); (*snum)++) { ss1->array[num_entries].conn_id = (*stot); ss1->array[num_entries].conn_type = 0x3; @@ -1067,7 +1067,7 @@ static WERROR net_file_enum_3(pipes_struct *p, union srvsvc_NetFileCtr *ctr, uin (b) active pipes (c) open directories and files */ - ctr->ctr3 = talloc_zero(p->mem_ctx, struct srvsvc_NetFileCtr3); + ctr->ctr3 = TALLOC_ZERO_P(p->mem_ctx, struct srvsvc_NetFileCtr3); status = net_enum_files( ctx, &ctr->ctr3->array, num_entries, resume_hnd ); if ( !W_ERROR_IS_OK(status)) @@ -1121,7 +1121,7 @@ WERROR _srvsvc_NetSrvGetInfo(pipes_struct *p, struct srvsvc_NetSrvGetInfo *r) here, as most of it is made up. */ case 102: - r->out.info->info102 = talloc_zero(p->mem_ctx, struct srvsvc_NetSrvInfo102); + r->out.info->info102 = TALLOC_ZERO_P(p->mem_ctx, struct srvsvc_NetSrvInfo102); r->out.info->info102->platform_id = 500; r->out.info->info102->version_major = lp_major_announce_version(); @@ -1138,7 +1138,7 @@ WERROR _srvsvc_NetSrvGetInfo(pipes_struct *p, struct srvsvc_NetSrvGetInfo *r) r->out.info->info102->comment = lp_serverstring(); break; case 101: - r->out.info->info101 = talloc_zero(p->mem_ctx, struct srvsvc_NetSrvInfo101); + r->out.info->info101 = TALLOC_ZERO_P(p->mem_ctx, struct srvsvc_NetSrvInfo101); r->out.info->info101->platform_id = 500; r->out.info->info101->server_name = global_myname(); r->out.info->info101->version_major = lp_major_announce_version(); @@ -1147,7 +1147,7 @@ WERROR _srvsvc_NetSrvGetInfo(pipes_struct *p, struct srvsvc_NetSrvGetInfo *r) r->out.info->info101->comment = lp_serverstring(); break; case 100: - r->out.info->info100 = talloc_zero(p->mem_ctx, struct srvsvc_NetSrvInfo100); + r->out.info->info100 = TALLOC_ZERO_P(p->mem_ctx, struct srvsvc_NetSrvInfo100); r->out.info->info100->platform_id = 500; r->out.info->info100->server_name = global_myname(); break; |