dsdb: Simplify DsCrackNameOneFilter a bit
authorVolker Lendecke <vl@samba.org>
Sat, 3 Nov 2012 08:36:29 +0000 (09:36 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 5 Nov 2012 21:27:44 +0000 (08:27 +1100)
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 <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/cracknames.c

index 8b52aa3199923dd78360a9d0cb8c2dab4619c361..f136dec7fa8a78ecc74df0255b5474f8e88ed679 100644 (file)
@@ -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.  */