s4:rpc_server/lsa: remove unused 'status' variable in dcesrv_lsa_LookupSids_common()
authorStefan Metzmacher <metze@samba.org>
Mon, 20 Mar 2017 11:56:00 +0000 (12:56 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 21 Feb 2018 13:19:18 +0000 (14:19 +0100)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13286

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source4/rpc_server/lsa/lsa_lookup.c

index 219e30194b788160858b487ad38fb35496562eb9..a8a136b1266fc7869cc698ba2b656175a52da20a 100644 (file)
@@ -593,7 +593,6 @@ static NTSTATUS dcesrv_lsa_LookupSids_common(struct dcesrv_call_state *dce_call,
                                             struct lsa_LookupSids2 *r)
 {
        struct lsa_RefDomainList *domains = NULL;
-       NTSTATUS status = NT_STATUS_OK;
        uint32_t i;
 
        *r->out.domains = NULL;
@@ -641,14 +640,12 @@ static NTSTATUS dcesrv_lsa_LookupSids_common(struct dcesrv_call_state *dce_call,
 
                if (sid_str == NULL) {
                        r->out.names->names[i].name.string = "(SIDERROR)";
-                       status = STATUS_SOME_UNMAPPED;
                        continue;
                }
 
                status2 = dcesrv_lsa_lookup_sid(state, mem_ctx, sid, sid_str, 
                                                &authority_name, &name, &rtype);
                if (!NT_STATUS_IS_OK(status2)) {
-                       status = STATUS_SOME_UNMAPPED;
                        continue;
                }
 
@@ -675,7 +672,7 @@ static NTSTATUS dcesrv_lsa_LookupSids_common(struct dcesrv_call_state *dce_call,
                return STATUS_SOME_UNMAPPED;
        }
 
-       return status;
+       return NT_STATUS_OK;
 }
 
 /*