diff options
author | Michal Zidek <mzidek@redhat.com> | 2013-01-10 14:11:55 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-16 15:35:55 +0100 |
commit | f82135b75f0574e65c73269d6f24d42ba025b8e2 (patch) | |
tree | 10553c5e853252540db49ef8de7f1687f9f419e6 /src/tools | |
parent | 1cde5866227feccf482f82c112c352c103afbc59 (diff) | |
download | sssd-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.c | 5 |
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); |