summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-02-20 15:57:37 +0100
committerRalph Boehme <slow@samba.org>2018-02-21 14:19:18 +0100
commit9ccc6eef145c1f67e24cbb1c21402714f612c607 (patch)
treee1e4a24931954dfe609874fff321f208e1dc4c17
parentb02de5ad3e04babe1565868c69422cfc778458d9 (diff)
downloadsamba-9ccc6eef145c1f67e24cbb1c21402714f612c607.tar.gz
rpcclient: fix variable initialisation and add parenthesis to if clauses
Just a few README.Coding fixes. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13286 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/rpcclient/cmd_lsarpc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index 2fa04a27752..058583d943a 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -272,8 +272,8 @@ static NTSTATUS cmd_lsa_lookup_names_level(struct rpc_pipe_client *cli,
{
struct policy_handle pol;
NTSTATUS status, result;
- struct dom_sid *sids;
- enum lsa_SidType *types;
+ struct dom_sid *sids = NULL;
+ enum lsa_SidType *types = NULL;
int i, level;
struct dcerpc_binding_handle *b = cli->binding_handle;
@@ -285,9 +285,9 @@ static NTSTATUS cmd_lsa_lookup_names_level(struct rpc_pipe_client *cli,
status = rpccli_lsa_open_policy(cli, mem_ctx, True,
SEC_FLAG_MAXIMUM_ALLOWED,
&pol);
-
- if (!NT_STATUS_IS_OK(status))
+ if (!NT_STATUS_IS_OK(status)) {
goto done;
+ }
level = atoi(argv[1]);
@@ -296,7 +296,9 @@ static NTSTATUS cmd_lsa_lookup_names_level(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(status) && NT_STATUS_V(status) !=
NT_STATUS_V(STATUS_SOME_UNMAPPED))
+ {
goto done;
+ }
status = NT_STATUS_OK;