summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-02-17 15:15:47 +0100
committerGünther Deschner <gd@samba.org>2010-02-18 01:47:57 +0100
commitd5e30dec8bbc695d640df335a83554f1666907b5 (patch)
tree5063b553a253d549775ae172ec4ed8ccc433bdcc
parent38c50c7027d2a2a9a3df060b74b2a2efce4d9e6f (diff)
downloadsamba-d5e30dec8bbc695d640df335a83554f1666907b5.tar.gz
samba-d5e30dec8bbc695d640df335a83554f1666907b5.tar.bz2
samba-d5e30dec8bbc695d640df335a83554f1666907b5.zip
s3-rpcclient: fix uninitialized variable in wkssvc_enumerateusers.
Guenther
-rw-r--r--source3/rpcclient/cmd_wkssvc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/rpcclient/cmd_wkssvc.c b/source3/rpcclient/cmd_wkssvc.c
index 34ad57650c..147501049a 100644
--- a/source3/rpcclient/cmd_wkssvc.c
+++ b/source3/rpcclient/cmd_wkssvc.c
@@ -190,7 +190,7 @@ static WERROR cmd_wkssvc_enumerateusers(struct rpc_pipe_client *cli,
}
for (i=0; i<num_entries; i++) {
- const char *user;
+ const char *user = NULL;
switch (info.level) {
case 0:
user = info.ctr.user0->user0[i].user_name;
@@ -202,7 +202,7 @@ static WERROR cmd_wkssvc_enumerateusers(struct rpc_pipe_client *cli,
info.ctr.user1->user1[i].user_name);
break;
}
- printf("%s\n", user);
+ printf("%s\n", user ? user : "(null)");
}
return werr;