diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-07 11:10:15 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-09 12:40:08 +0200 |
commit | 73b377432c5efb8451f09f6d25d8aa1b28c239c9 (patch) | |
tree | 54b158384a1312337a966ab7e2a9fe697163b75d /source3/rpc_server/spoolss | |
parent | 8459391e31079066745a65c5f3c07f3899afdc0c (diff) | |
download | samba-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/spoolss')
-rw-r--r-- | source3/rpc_server/spoolss/srv_spoolss_nt.c | 22 |
1 files changed, 11 insertions, 11 deletions
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) { |