s3-spoolss: remove unused dup_nt_devicemode().
authorGünther Deschner <gd@samba.org>
Tue, 14 Apr 2009 10:00:39 +0000 (12:00 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 14 Apr 2009 10:13:17 +0000 (12:13 +0200)
Guenther

source3/include/proto.h
source3/printing/nt_printing.c

index b8ba8c03ada5f1bfa595967ad0261e886a9873f1..25e81fde11fbafb44c664d1a539b69b8ea569b05 100644 (file)
@@ -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 );
index c20171b04967a3e2d4668e0336fefffd25b899f2..f3b938e6ff44a77d813a7d81874eda7a4175adda 100644 (file)
@@ -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.
 ****************************************************************************/