From: Volker Lendecke Date: Sat, 3 Nov 2012 08:36:29 +0000 (+0100) Subject: dsdb: Simplify DsCrackNameOneFilter a bit X-Git-Tag: ldb-1.1.14~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=26faa8fe3a42f9d1278d81773c8808b05fcd76f8;p=thirdparty%2Fsamba.git 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. Signed-off-by: Andrew Bartlett Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/samdb/cracknames.c b/source4/dsdb/samdb/cracknames.c index 8b52aa31999..f136dec7fa8 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. */