summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-03-04 18:06:01 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-03-04 23:33:52 +0100
commit850ca620611f65115ee95e1d919be8443f95c14c (patch)
treea74cca0acc27ed9fadc51833471ac264bfeba15d
parent67dac0a65e9322771d853ee0914c41c30a1c4432 (diff)
downloadsssd-850ca620611f65115ee95e1d919be8443f95c14c.tar.gz
sssd-850ca620611f65115ee95e1d919be8443f95c14c.tar.bz2
sssd-850ca620611f65115ee95e1d919be8443f95c14c.zip
Improved readability of get_next_domain()
https://fedorahosted.org/sssd/ticket/1812
-rw-r--r--src/util/domain_info_utils.c4
1 files 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;