From f82135b75f0574e65c73269d6f24d42ba025b8e2 Mon Sep 17 00:00:00 2001 From: Michal Zidek Date: Thu, 10 Jan 2013 14:11:55 +0100 Subject: 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 --- src/tools/sss_cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/tools') diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c index 15dcf7e1c..2fb75ad60 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); -- cgit