From e3ceb0c65333cb870463971021e3af24d82abf26 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 14 Apr 2009 12:00:39 +0200 Subject: s3-spoolss: remove unused dup_nt_devicemode(). Guenther --- source3/include/proto.h | 1 - source3/printing/nt_printing.c | 28 ---------------------------- 2 files changed, 29 deletions(-) (limited to 'source3') diff --git a/source3/include/proto.h b/source3/include/proto.h index b8ba8c03ad..25e81fde11 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4843,7 +4843,6 @@ WERROR move_driver_to_download_area(struct pipes_struct *p, int pack_devicemode(NT_DEVICEMODE *nt_devmode, uint8 *buf, int buflen); uint32 del_a_printer(const char *sharename); NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename); -NT_DEVICEMODE *dup_nt_devicemode(NT_DEVICEMODE *nt_devicemode); void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr); int unpack_devicemode(NT_DEVICEMODE **nt_devmode, const uint8 *buf, int buflen); int add_new_printer_key( NT_PRINTER_DATA *data, const char *name ); diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index c20171b049..f3b938e6ff 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2731,34 +2731,6 @@ NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename) return nt_devmode; } -/**************************************************************************** - Deepcopy an NT devicemode. -****************************************************************************/ - -NT_DEVICEMODE *dup_nt_devicemode(NT_DEVICEMODE *nt_devicemode) -{ - NT_DEVICEMODE *new_nt_devicemode = NULL; - - if ( !nt_devicemode ) - return NULL; - - if ((new_nt_devicemode = (NT_DEVICEMODE *)memdup(nt_devicemode, sizeof(NT_DEVICEMODE))) == NULL) { - DEBUG(0,("dup_nt_devicemode: malloc fail.\n")); - return NULL; - } - - new_nt_devicemode->nt_dev_private = NULL; - if (nt_devicemode->nt_dev_private != NULL) { - if ((new_nt_devicemode->nt_dev_private = (uint8 *)memdup(nt_devicemode->nt_dev_private, nt_devicemode->driverextra)) == NULL) { - SAFE_FREE(new_nt_devicemode); - DEBUG(0,("dup_nt_devicemode: malloc fail.\n")); - return NULL; - } - } - - return new_nt_devicemode; -} - /**************************************************************************** Clean up and deallocate a (maybe partially) allocated NT_DEVICEMODE. ****************************************************************************/ -- cgit