diff options
author | Günther Deschner <gd@samba.org> | 2009-03-11 11:52:04 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-03-13 09:25:25 +0100 |
commit | 5d76a12cf50872ce068cbd2b3b50f6690651aa50 (patch) | |
tree | 6c560e2132e279d933ceec31a5f576fd75694225 /source3 | |
parent | 0658a402d7117b3daf6b100804e73a011e7ad62c (diff) | |
download | samba-5d76a12cf50872ce068cbd2b3b50f6690651aa50.tar.gz samba-5d76a12cf50872ce068cbd2b3b50f6690651aa50.tar.bz2 samba-5d76a12cf50872ce068cbd2b3b50f6690651aa50.zip |
s3-rpcclient: pure cosmetics for cmd_spoolss_getprinter.
Guenther
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 1b8588ac48..e7807e3701 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -567,7 +567,7 @@ static WERROR cmd_spoolss_getprinter(struct rpc_pipe_client *cli, { POLICY_HND pol; WERROR result; - uint32 info_level = 1; + uint32_t level = 1; const char *printername; union spoolss_PrinterInfo info; @@ -578,7 +578,7 @@ static WERROR cmd_spoolss_getprinter(struct rpc_pipe_client *cli, /* Open a printer handle */ if (argc == 3) { - info_level = atoi(argv[2]); + level = atoi(argv[2]); } RPCCLIENT_PRINTERNAME(printername, cli, argv[1]); @@ -589,21 +589,23 @@ static WERROR cmd_spoolss_getprinter(struct rpc_pipe_client *cli, printername, SEC_FLAG_MAXIMUM_ALLOWED, &pol); - if (!W_ERROR_IS_OK(result)) + if (!W_ERROR_IS_OK(result)) { goto done; + } /* Get printer info */ result = rpccli_spoolss_getprinter(cli, mem_ctx, &pol, - info_level, + level, 0, &info); - if (!W_ERROR_IS_OK(result)) + if (!W_ERROR_IS_OK(result)) { goto done; + } /* Display printer info */ - switch (info_level) { + switch (level) { case 0: display_print_info0(&info.info0); break; @@ -620,12 +622,13 @@ static WERROR cmd_spoolss_getprinter(struct rpc_pipe_client *cli, display_print_info7(&info.info7); break; default: - printf("unknown info level %d\n", info_level); + printf("unknown info level %d\n", level); break; } done: - if (is_valid_policy_hnd(&pol)) + if (is_valid_policy_hnd(&pol)) { rpccli_spoolss_ClosePrinter(cli, mem_ctx, &pol, NULL); + } return result; } |