summaryrefslogtreecommitdiffstats
path: root/src
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 /src
parent67dac0a65e9322771d853ee0914c41c30a1c4432 (diff)
downloadsssd-850ca620611f65115ee95e1d919be8443f95c14c.tar.gz
sssd-850ca620611f65115ee95e1d919be8443f95c14c.tar.xz
sssd-850ca620611f65115ee95e1d919be8443f95c14c.zip
Improved readability of get_next_domain()
https://fedorahosted.org/sssd/ticket/1812
Diffstat (limited to 'src')
-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 039d66f86..34aa3f33b 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;