From 90fb59cb440d4e2d68c550f554a0a4a3cb386762 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 8 Feb 2008 11:40:55 -0800 Subject: [PATCH] Fix warning and use of uninitialized variable. gd please check ! Jeremy. --- source/rpcclient/cmd_samr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/rpcclient/cmd_samr.c b/source/rpcclient/cmd_samr.c index bec7227e83f..edc3c9d4b2d 100644 --- a/source/rpcclient/cmd_samr.c +++ b/source/rpcclient/cmd_samr.c @@ -1332,7 +1332,7 @@ static NTSTATUS cmd_samr_query_dispinfo(struct rpc_pipe_client *cli, { POLICY_HND connect_pol, domain_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - uint32 start_idx=0, max_entries=250, max_size = 0xffff, num_entries, i; + uint32 start_idx=0, max_entries=250, max_size = 0xffff, num_entries = 0, i; uint32 access_mask = MAXIMUM_ALLOWED_ACCESS; uint32 info_level = 1; union samr_DispInfo info; @@ -1859,7 +1859,7 @@ static NTSTATUS cmd_samr_lookup_rids(struct rpc_pipe_client *cli, { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; POLICY_HND connect_pol, domain_pol; - uint32_t num_rids, num_names, *rids; + uint32_t num_rids, *rids; struct lsa_Strings names; struct samr_Ids types; @@ -1923,7 +1923,7 @@ static NTSTATUS cmd_samr_lookup_rids(struct rpc_pipe_client *cli, /* Display results */ - for (i = 0; i < num_names; i++) { + for (i = 0; i < num_rids; i++) { printf("rid 0x%x: %s (%d)\n", rids[i], names.names[i].string, types.ids[i]); }