rpcclient: fix variable initialisation and add parenthesis to if clauses
authorRalph Boehme <slow@samba.org>
Tue, 20 Feb 2018 14:57:37 +0000 (15:57 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 21 Feb 2018 13:19:18 +0000 (14:19 +0100)
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>
source3/rpcclient/cmd_lsarpc.c

index 2fa04a27752bf0dc2b01050d08da58f8050bd1ea..058583d943a329742d14e9984c895af8bc84c5fe 100644 (file)
@@ -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;