diff options
author | Volker Lendecke <vl@samba.org> | 2011-03-16 18:50:02 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-03-16 21:14:58 +0100 |
commit | a282455978eb28855317ec6b667436f9c0edda02 (patch) | |
tree | b7c9a1d88de847e5caffede559f25886c1e55b18 /source3/rpc_server | |
parent | 9c9ed33cb7264db4ec486ead7d2cf1b414e79500 (diff) | |
download | samba-a282455978eb28855317ec6b667436f9c0edda02.tar.gz samba-a282455978eb28855317ec6b667436f9c0edda02.tar.bz2 samba-a282455978eb28855317ec6b667436f9c0edda02.zip |
s3: Fix Coverity ID 1012, CHECKED_RETURN
This is probably more or less taste. Removing the necessity for a comment is a
good thing though IMO.
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/lsa/srv_lsa_nt.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c index eeea5163b2..0f0bbe159b 100644 --- a/source3/rpc_server/lsa/srv_lsa_nt.c +++ b/source3/rpc_server/lsa/srv_lsa_nt.c @@ -184,7 +184,7 @@ static NTSTATUS lookup_lsa_rids(TALLOC_CTX *mem_ctx, int dom_idx; const char *full_name; const char *domain; - enum lsa_SidType type = SID_NAME_UNKNOWN; + enum lsa_SidType type; /* Split name into domain and user component */ @@ -199,11 +199,10 @@ static NTSTATUS lookup_lsa_rids(TALLOC_CTX *mem_ctx, DEBUG(5, ("lookup_lsa_rids: looking up name %s\n", full_name)); - /* We can ignore the result of lookup_name, it will not touch - "type" if it's not successful */ - - lookup_name(mem_ctx, full_name, flags, &domain, NULL, - &sid, &type); + if (!lookup_name(mem_ctx, full_name, flags, &domain, NULL, + &sid, &type)) { + type = SID_NAME_UNKNOWN; + } switch (type) { case SID_NAME_USER: |