summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-15 03:00:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:29 -0500
commitfa57a318b452ba7832492ee7e2ac0c28749881e0 (patch)
treeb7cbffac557e3fc5d5157b20c5d2c7a9e8001c95
parent0e0d21dd3deaa5c08e04de796c7abe32125c213d (diff)
downloadsamba-fa57a318b452ba7832492ee7e2ac0c28749881e0.tar.gz
samba-fa57a318b452ba7832492ee7e2ac0c28749881e0.tar.bz2
samba-fa57a318b452ba7832492ee7e2ac0c28749881e0.zip
r14416: Remove deadcode. Coverity #198.
Jeremy. (This used to be commit 7fc61f5a63c982cfd0fbe1838979ba7be8f69fca)
-rw-r--r--source3/utils/net_rpc_printer.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index 9bae6a9b4e..8808d549ac 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -1922,7 +1922,6 @@ NTSTATUS rpc_printer_migrate_printers_internals(const DOM_SID *domain_sid,
if (!NT_STATUS_IS_OK(nt_status))
return nt_status;
-
/* enum printers */
if (!get_printer_info(pipe_hnd, mem_ctx, level, argc, argv, &num_printers, &ctr_enum)) {
nt_status = NT_STATUS_UNSUCCESSFUL;
@@ -1951,7 +1950,6 @@ NTSTATUS rpc_printer_migrate_printers_internals(const DOM_SID *domain_sid,
d_printf("migrating printer queue for: [%s] / [%s]\n",
printername, sharename);
-
/* open dst printer handle */
if (!net_spoolss_open_printer_ex(pipe_hnd_dst, mem_ctx, sharename,
PRINTER_ALL_ACCESS, cli->user_name, &hnd_dst)) {
@@ -1961,18 +1959,12 @@ NTSTATUS rpc_printer_migrate_printers_internals(const DOM_SID *domain_sid,
got_hnd_dst = True;
}
-
/* check for existing dst printer */
if (!net_spoolss_getprinter(pipe_hnd_dst, mem_ctx, &hnd_dst, level, &ctr_dst)) {
printf ("could not get printer, creating printer.\n");
} else {
DEBUG(1,("printer already exists: %s\n", sharename));
- /* close printer handles here */
- if (got_hnd_src) {
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
- got_hnd_src = False;
- }
-
+ /* close printer handle here - dst only, not got src yet. */
if (got_hnd_dst) {
rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
got_hnd_dst = False;
@@ -1980,7 +1972,6 @@ NTSTATUS rpc_printer_migrate_printers_internals(const DOM_SID *domain_sid,
continue;
}
-
/* now get again src printer ctr via getprinter,
we first need a handle for that */
@@ -1995,7 +1986,6 @@ NTSTATUS rpc_printer_migrate_printers_internals(const DOM_SID *domain_sid,
if (!net_spoolss_getprinter(pipe_hnd, mem_ctx, &hnd_src, level, &ctr_src))
goto done;
-
/* copy each src printer to a dst printer 1:1,
maybe some values have to be changed though */
d_printf("creating printer: %s\n", printername);