summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-07 11:10:15 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-09 12:40:08 +0200
commit73b377432c5efb8451f09f6d25d8aa1b28c239c9 (patch)
tree54b158384a1312337a966ab7e2a9fe697163b75d /source3/rpc_server
parent8459391e31079066745a65c5f3c07f3899afdc0c (diff)
downloadsamba-73b377432c5efb8451f09f6d25d8aa1b28c239c9.tar.gz
samba-73b377432c5efb8451f09f6d25d8aa1b28c239c9.tar.bz2
samba-73b377432c5efb8451f09f6d25d8aa1b28c239c9.zip
s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
Using the standard macro makes it easier to move code into common, as TALLOC_REALLOC_ARRAY isn't standard talloc. Andrew Bartlett
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/lsa/srv_lsa_nt.c2
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c22
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c12
3 files changed, 18 insertions, 18 deletions
diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c
index da0f697dc9..393dc31454 100644
--- a/source3/rpc_server/lsa/srv_lsa_nt.c
+++ b/source3/rpc_server/lsa/srv_lsa_nt.c
@@ -122,7 +122,7 @@ static int init_lsa_ref_domain_list(TALLOC_CTX *mem_ctx,
ref->count = num + 1;
ref->max_size = LSA_REF_DOMAIN_LIST_MULTIPLIER;
- ref->domains = TALLOC_REALLOC_ARRAY(mem_ctx, ref->domains,
+ ref->domains = talloc_realloc(mem_ctx, ref->domains,
struct lsa_DomainInfo, ref->count);
if (!ref->domains) {
return -1;
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index a946bc91d0..6b037232a6 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -1094,7 +1094,7 @@ static int notify_msg_ctr_addmsg( SPOOLSS_NOTIFY_MSG_CTR *ctr, SPOOLSS_NOTIFY_MS
if ( i == ctr->num_groups ) {
ctr->num_groups++;
- if ( !(groups = TALLOC_REALLOC_ARRAY( ctr->ctx, ctr->msg_groups, SPOOLSS_NOTIFY_MSG_GROUP, ctr->num_groups)) ) {
+ if ( !(groups = talloc_realloc( ctr->ctx, ctr->msg_groups, SPOOLSS_NOTIFY_MSG_GROUP, ctr->num_groups)) ) {
DEBUG(0,("notify_msg_ctr_addmsg: talloc_realloc() failed!\n"));
return 0;
}
@@ -1112,7 +1112,7 @@ static int notify_msg_ctr_addmsg( SPOOLSS_NOTIFY_MSG_CTR *ctr, SPOOLSS_NOTIFY_MS
msg_grp->num_msgs++;
- if ( !(msg_list = TALLOC_REALLOC_ARRAY( ctr->ctx, msg_grp->msgs, SPOOLSS_NOTIFY_MSG, msg_grp->num_msgs )) ) {
+ if ( !(msg_list = talloc_realloc( ctr->ctx, msg_grp->msgs, SPOOLSS_NOTIFY_MSG, msg_grp->num_msgs )) ) {
DEBUG(0,("notify_msg_ctr_addmsg: talloc_realloc() failed for new message [%d]!\n", msg_grp->num_msgs));
return 0;
}
@@ -3438,7 +3438,7 @@ static bool construct_notify_printer_info(struct messaging_context *msg_ctx,
if (!search_notify(type, field, &j) )
continue;
- info->notifies = TALLOC_REALLOC_ARRAY(info, info->notifies,
+ info->notifies = talloc_realloc(info, info->notifies,
struct spoolss_Notify,
info->count + 1);
if (info->notifies == NULL) {
@@ -3498,7 +3498,7 @@ static bool construct_notify_jobs_info(struct messaging_context *msg_ctx,
if (!search_notify(type, field, &j) )
continue;
- info->notifies = TALLOC_REALLOC_ARRAY(info, info->notifies,
+ info->notifies = talloc_realloc(info, info->notifies,
struct spoolss_Notify,
info->count + 1);
if (info->notifies == NULL) {
@@ -4307,7 +4307,7 @@ static WERROR enum_all_printers_info_level(TALLOC_CTX *mem_ctx,
goto out;
}
- info = TALLOC_REALLOC_ARRAY(mem_ctx, info,
+ info = talloc_realloc(mem_ctx, info,
union spoolss_PrinterInfo,
count + 1);
if (!info) {
@@ -5347,7 +5347,7 @@ static WERROR spoolss_DriverFileInfo_from_driver(TALLOC_CTX *mem_ctx,
*count_p = 0;
if (strlen(driver->driver_path)) {
- info = TALLOC_REALLOC_ARRAY(mem_ctx, info,
+ info = talloc_realloc(mem_ctx, info,
struct spoolss_DriverFileInfo,
count + 1);
W_ERROR_HAVE_NO_MEMORY(info);
@@ -5362,7 +5362,7 @@ static WERROR spoolss_DriverFileInfo_from_driver(TALLOC_CTX *mem_ctx,
}
if (strlen(driver->config_file)) {
- info = TALLOC_REALLOC_ARRAY(mem_ctx, info,
+ info = talloc_realloc(mem_ctx, info,
struct spoolss_DriverFileInfo,
count + 1);
W_ERROR_HAVE_NO_MEMORY(info);
@@ -5377,7 +5377,7 @@ static WERROR spoolss_DriverFileInfo_from_driver(TALLOC_CTX *mem_ctx,
}
if (strlen(driver->data_file)) {
- info = TALLOC_REALLOC_ARRAY(mem_ctx, info,
+ info = talloc_realloc(mem_ctx, info,
struct spoolss_DriverFileInfo,
count + 1);
W_ERROR_HAVE_NO_MEMORY(info);
@@ -5392,7 +5392,7 @@ static WERROR spoolss_DriverFileInfo_from_driver(TALLOC_CTX *mem_ctx,
}
if (strlen(driver->help_file)) {
- info = TALLOC_REALLOC_ARRAY(mem_ctx, info,
+ info = talloc_realloc(mem_ctx, info,
struct spoolss_DriverFileInfo,
count + 1);
W_ERROR_HAVE_NO_MEMORY(info);
@@ -5407,7 +5407,7 @@ static WERROR spoolss_DriverFileInfo_from_driver(TALLOC_CTX *mem_ctx,
}
for (i=0; driver->dependent_files[i] && driver->dependent_files[i][0] != '\0'; i++) {
- info = TALLOC_REALLOC_ARRAY(mem_ctx, info,
+ info = talloc_realloc(mem_ctx, info,
struct spoolss_DriverFileInfo,
count + 1);
W_ERROR_HAVE_NO_MEMORY(info);
@@ -7292,7 +7292,7 @@ static WERROR enumprinterdrivers_level_by_architecture(TALLOC_CTX *mem_ctx,
num_drivers, architecture, version));
if (num_drivers != 0) {
- info = TALLOC_REALLOC_ARRAY(mem_ctx, info,
+ info = talloc_realloc(mem_ctx, info,
union spoolss_DriverInfo,
count + num_drivers);
if (!info) {
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index 7251d70dd9..c63a81dd77 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -101,7 +101,7 @@ static int pipe_enum_fn( struct db_record *rec, void *p)
return 1;
}
- f = TALLOC_REALLOC_ARRAY(fenum->ctx, fenum->ctr3->array,
+ f = talloc_realloc(fenum->ctx, fenum->ctr3->array,
struct srvsvc_NetFileInfo3, i+1);
if ( !f ) {
DEBUG(0,("conn_enum_fn: realloc failed for %d items\n", i+1));
@@ -179,7 +179,7 @@ static void enum_file_fn( const struct share_mode_entry *e,
return;
}
- f = TALLOC_REALLOC_ARRAY(fenum->ctx, fenum->ctr3->array,
+ f = talloc_realloc(fenum->ctx, fenum->ctr3->array,
struct srvsvc_NetFileInfo3, i+1);
if ( !f ) {
DEBUG(0,("conn_enum_fn: realloc failed for %d items\n", i+1));
@@ -816,7 +816,7 @@ static WERROR init_srv_sess_info_0(struct pipes_struct *p,
for (; resume_handle < *total_entries; resume_handle++) {
- ctr0->array = TALLOC_REALLOC_ARRAY(p->mem_ctx,
+ ctr0->array = talloc_realloc(p->mem_ctx,
ctr0->array,
struct srvsvc_NetSessInfo0,
num_entries+1);
@@ -914,7 +914,7 @@ static WERROR init_srv_sess_info_1(struct pipes_struct *p,
num_files = net_count_files(pw->pw_uid, session_list[resume_handle].pid);
guest = strequal( session_list[resume_handle].username, lp_guestaccount() );
- ctr1->array = TALLOC_REALLOC_ARRAY(p->mem_ctx,
+ ctr1->array = talloc_realloc(p->mem_ctx,
ctr1->array,
struct srvsvc_NetSessInfo1,
num_entries+1);
@@ -969,7 +969,7 @@ static WERROR init_srv_conn_info_0(struct srvsvc_NetConnCtr0 *ctr0,
for (; resume_handle < *total_entries; resume_handle++) {
- ctr0->array = TALLOC_REALLOC_ARRAY(talloc_tos(),
+ ctr0->array = talloc_realloc(talloc_tos(),
ctr0->array,
struct srvsvc_NetConnInfo0,
num_entries+1);
@@ -1023,7 +1023,7 @@ static WERROR init_srv_conn_info_1(struct srvsvc_NetConnCtr1 *ctr1,
for (; resume_handle < *total_entries; resume_handle++) {
- ctr1->array = TALLOC_REALLOC_ARRAY(talloc_tos(),
+ ctr1->array = talloc_realloc(talloc_tos(),
ctr1->array,
struct srvsvc_NetConnInfo1,
num_entries+1);