summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpcclient/cmd_spoolss.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index a1e3d1f9ff..5d51e61b40 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -339,8 +339,11 @@ static NTSTATUS cmd_spoolss_enum_printers(struct cli_state *cli,
info_level, &num_printers, &ctr);
if (W_ERROR_IS_OK(result)) {
- if (!num_printers)
- printf ("No Printers printers returned.\n");
+
+ if (!num_printers) {
+ printf ("No printers returned.\n");
+ goto done;
+ }
for (i = 0; i < num_printers; i++) {
switch(info_level) {