From ceec217ded982a019927045aeaa7ccd0ebdd6555 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 3 Nov 2012 09:36:29 +0100 Subject: [PATCH] dsdb: Simplify DsCrackNameOneFilter a bit For me "else" branches clutter my flow reading code. If we do a hard return at the end of an "if" branch, "else" is not required. --- source4/dsdb/samdb/cracknames.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source4/dsdb/samdb/cracknames.c b/source4/dsdb/samdb/cracknames.c index 8b52aa3..f136dec 100644 --- a/source4/dsdb/samdb/cracknames.c +++ b/source4/dsdb/samdb/cracknames.c @@ -1070,7 +1070,10 @@ static WERROR DsCrackNameOneFilter(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ if (sid == NULL) { info1->status = DRSUAPI_DS_NAME_STATUS_NO_MAPPING; return WERR_OK; - } else if (samdb_find_attribute(sam_ctx, result, "objectClass", "domain")) { + } + + if (samdb_find_attribute(sam_ctx, result, "objectClass", + "domain")) { /* This can also find a DomainDNSZones entry, * but it won't have the SID we just * checked. */ -- 1.7.9.5