summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2013-01-10 14:11:55 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-01-16 15:35:55 +0100
commitf82135b75f0574e65c73269d6f24d42ba025b8e2 (patch)
tree10553c5e853252540db49ef8de7f1687f9f419e6 /src/tools
parent1cde5866227feccf482f82c112c352c103afbc59 (diff)
downloadsssd-f82135b75f0574e65c73269d6f24d42ba025b8e2.tar.gz
sssd-f82135b75f0574e65c73269d6f24d42ba025b8e2.tar.bz2
sssd-f82135b75f0574e65c73269d6f24d42ba025b8e2.zip
sss_cache: Call DEBUG_INIT sooner
If bad parameteres were passed to sss_cache, the init function returned without calling DEBUG_INIT macro and unnecessary level 1 debug message was printed. https://fedorahosted.org/sssd/ticket/1745
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/sss_cache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c
index 15dcf7e1..2fb75ad6 100644
--- a/src/tools/sss_cache.c
+++ b/src/tools/sss_cache.c
@@ -521,6 +521,9 @@ errno_t init_context(int argc, const char *argv[], struct cache_tool_ctx **tctx)
}
}
+ DEBUG_INIT(debug);
+ debug_prg_name = argv[0];
+
if (ret != -1) {
BAD_POPT_PARAMS(pc, poptStrerror(ret), ret, fini);
}
@@ -532,8 +535,6 @@ errno_t init_context(int argc, const char *argv[], struct cache_tool_ctx **tctx)
ret, fini);
}
- DEBUG_INIT(debug);
- debug_prg_name = argv[0];
CHECK_ROOT(ret, debug_prg_name);
ctx = talloc_zero(NULL, struct cache_tool_ctx);