diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/sss_cache.c | 2 | ||||
-rw-r--r-- | src/tools/sss_debuglevel.c | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c index 2fb75ad6..db6c792c 100644 --- a/src/tools/sss_cache.c +++ b/src/tools/sss_cache.c @@ -103,7 +103,7 @@ int main(int argc, const char *argv[]) goto done; } - for (dinfo = tctx->domains; dinfo; dinfo = dinfo->next) { + for (dinfo = tctx->domains; dinfo; dinfo = get_next_domain(dinfo, false)) { sysdb = dinfo->sysdb; /* Update filters for each domain */ diff --git a/src/tools/sss_debuglevel.c b/src/tools/sss_debuglevel.c index e955ec38..ce428bd9 100644 --- a/src/tools/sss_debuglevel.c +++ b/src/tools/sss_debuglevel.c @@ -253,8 +253,11 @@ errno_t get_confdb_sections(TALLOC_CTX *ctx, struct confdb_ctx *confdb, if (ret != EOK) DEBUG(SSSDBG_CRIT_FAILURE, ("Unable to get domain list\n")); - for (domain = domain_list; domain != NULL; domain = domain->next) + for (domain = domain_list; + domain; + domain = get_next_domain(domain, false)) { domain_count++; + } /* allocate output space */ sections = talloc_array(ctx, char*, @@ -275,7 +278,9 @@ errno_t get_confdb_sections(TALLOC_CTX *ctx, struct confdb_ctx *confdb, } } - for (domain = domain_list; domain != NULL; domain = domain->next, i++) { + for (domain = domain_list; + domain; + domain = get_next_domain(domain, false), i++) { sections[i] = talloc_asprintf(tmp_ctx, CONFDB_DOMAIN_PATH_TMPL, domain->name); if (sections[i] == NULL) { |