summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-11-02 00:37:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:17 -0500
commitd6a68f8739488c1857b6dd8bdead24cda67a4800 (patch)
treefb73860832e721987bc176f272079ef495c19772 /source3
parentc9effb004cb4bb9baa87fb429f22c834226708bb (diff)
downloadsamba-d6a68f8739488c1857b6dd8bdead24cda67a4800.tar.gz
samba-d6a68f8739488c1857b6dd8bdead24cda67a4800.tar.bz2
samba-d6a68f8739488c1857b6dd8bdead24cda67a4800.zip
r11454: Last 2 uninitialized warnings.
Jeremy. (This used to be commit 5f10368ff0f5eae646533280a444dc091d732c0d)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/cmd_spoolss.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 688b7b520e..afca3e747f 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1065,14 +1065,13 @@ static WERROR cmd_spoolss_enum_drivers(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
- WERROR werror;
+ WERROR werror = WERR_OK;
uint32 info_level = 1;
PRINTER_DRIVER_CTR ctr;
uint32 i, j,
returned;
- if (argc > 2)
- {
+ if (argc > 2) {
printf("Usage: enumdrivers [level]\n");
return WERR_OK;
}
@@ -1082,8 +1081,7 @@ static WERROR cmd_spoolss_enum_drivers(struct rpc_pipe_client *cli,
/* loop through and print driver info level for each architecture */
- for (i=0; archi_table[i].long_archi!=NULL; i++)
- {
+ for (i=0; archi_table[i].long_archi!=NULL; i++) {
/* check to see if we already asked for this architecture string */
if ( i>0 && strequal(archi_table[i].long_archi, archi_table[i-1].long_archi) )
@@ -1115,22 +1113,22 @@ static WERROR cmd_spoolss_enum_drivers(struct rpc_pipe_client *cli,
case 1:
for (j=0; j < returned; j++) {
- display_print_driver_1 (&(ctr.info1[j]));
+ display_print_driver_1 (&ctr.info1[j]);
}
break;
case 2:
for (j=0; j < returned; j++) {
- display_print_driver_2 (&(ctr.info2[j]));
+ display_print_driver_2 (&ctr.info2[j]);
}
break;
case 3:
for (j=0; j < returned; j++) {
- display_print_driver_3 (&(ctr.info3[j]));
+ display_print_driver_3 (&ctr.info3[j]);
}
break;
default:
printf("unknown info level %d\n", info_level);
- break;
+ return WERR_UNKNOWN_LEVEL;
}
}
@@ -1555,13 +1553,12 @@ static WERROR cmd_spoolss_deletedriver(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
- WERROR result;
+ WERROR result = WERR_OK;
fstring servername;
int i;
/* parse the command arguements */
- if (argc != 2)
- {
+ if (argc != 2) {
printf ("Usage: %s <driver>\n", argv[0]);
return WERR_OK;
}
@@ -1570,8 +1567,7 @@ static WERROR cmd_spoolss_deletedriver(struct rpc_pipe_client *cli,
strupper_m(servername);
/* delete the driver for all architectures */
- for (i=0; archi_table[i].long_archi; i++)
- {
+ for (i=0; archi_table[i].long_archi; i++) {
/* make the call to remove the driver */
result = rpccli_spoolss_deleteprinterdriver(
cli, mem_ctx, archi_table[i].long_archi, argv[1]);
@@ -1582,9 +1578,7 @@ static WERROR cmd_spoolss_deletedriver(struct rpc_pipe_client *cli,
argv[1], archi_table[i].long_archi,
W_ERROR_V(result));
}
- }
- else
- {
+ } else {
printf ("Driver %s removed for arch [%s].\n", argv[1],
archi_table[i].long_archi);
}