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.
The last 3 patches address bug #9352 - samba crashes with certain RPC calls.
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. */