From 850ca620611f65115ee95e1d919be8443f95c14c Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Mon, 4 Mar 2013 18:06:01 +0100 Subject: Improved readability of get_next_domain() https://fedorahosted.org/sssd/ticket/1812 --- src/util/domain_info_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c index 039d66f8..34aa3f33 100644 --- a/src/util/domain_info_utils.c +++ b/src/util/domain_info_utils.c @@ -36,9 +36,9 @@ struct sss_domain_info *get_next_domain(struct sss_domain_info *domain, } else if (descend && IS_SUBDOMAIN(dom) && dom->parent->next) { dom = dom->parent->next; } else { - return NULL; + dom = NULL; } - if (!dom->disabled) break; + if (dom && !dom->disabled) break; } return dom; -- cgit