diff options
author | Günther Deschner <gd@samba.org> | 2009-03-11 11:48:58 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-03-13 09:25:25 +0100 |
commit | 0658a402d7117b3daf6b100804e73a011e7ad62c (patch) | |
tree | 13765032f63c9d7fd335cda1116aefe97e4f8545 /source3/rpcclient | |
parent | 7e753b28ea6be2ceaef61c4377812a348b650955 (diff) | |
download | samba-0658a402d7117b3daf6b100804e73a011e7ad62c.tar.gz samba-0658a402d7117b3daf6b100804e73a011e7ad62c.tar.xz samba-0658a402d7117b3daf6b100804e73a011e7ad62c.zip |
s3-rpcclient: pure cosmetics for cmd_spoolss_enum_ports.
Guenther
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 6bab5746e71..1b8588ac48f 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -364,8 +364,8 @@ static WERROR cmd_spoolss_enum_ports(struct rpc_pipe_client *cli, const char **argv) { WERROR result; - uint32 info_level = 1; - uint32 returned; + uint32_t level = 1; + uint32_t count; union spoolss_PortInfo *info; if (argc > 2) { @@ -373,22 +373,23 @@ static WERROR cmd_spoolss_enum_ports(struct rpc_pipe_client *cli, return WERR_OK; } - if (argc == 2) - info_level = atoi(argv[1]); + if (argc == 2) { + level = atoi(argv[1]); + } /* Enumerate ports */ result = rpccli_spoolss_enumports(cli, mem_ctx, cli->srv_name_slash, - info_level, + level, 0, - &returned, + &count, &info); if (W_ERROR_IS_OK(result)) { int i; - for (i = 0; i < returned; i++) { - switch (info_level) { + for (i = 0; i < count; i++) { + switch (level) { case 1: display_port_info_1(&info[i].info1); break; @@ -396,7 +397,7 @@ static WERROR cmd_spoolss_enum_ports(struct rpc_pipe_client *cli, display_port_info_2(&info[i].info2); break; default: - printf("unknown info level %d\n", info_level); + printf("unknown info level %d\n", level); break; } } |