summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-16 18:50:02 +0100
committerVolker Lendecke <vl@samba.org>2011-03-16 21:14:58 +0100
commit9c9ed33cb7264db4ec486ead7d2cf1b414e79500 (patch)
treeddc493b1f07023eb8c20f98dbc7ce70655bb0cb0
parent3835d77795bb3918a5eeea551afa02c94bb8db5a (diff)
downloadsamba-9c9ed33cb7264db4ec486ead7d2cf1b414e79500.tar.gz
samba-9c9ed33cb7264db4ec486ead7d2cf1b414e79500.tar.bz2
samba-9c9ed33cb7264db4ec486ead7d2cf1b414e79500.zip
s3: Fix Coverity ID 1013, CHECKED_RETURN
This is probably more or less taste. Removing the necessity for a comment is a good thing though IMO.
-rw-r--r--source3/rpc_server/lsa/srv_lsa_nt.c11
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 a4fc40a58b..eeea5163b2 100644
--- a/source3/rpc_server/lsa/srv_lsa_nt.c
+++ b/source3/rpc_server/lsa/srv_lsa_nt.c
@@ -268,7 +268,7 @@ static NTSTATUS lookup_lsa_sids(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;
ZERO_STRUCT(sid);
@@ -281,11 +281,10 @@ static NTSTATUS lookup_lsa_sids(TALLOC_CTX *mem_ctx,
DEBUG(5, ("init_lsa_sids: 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: