From fb0332565892bc10998ca98b567d4dde2213844d Mon Sep 17 00:00:00 2001 From: Nikolai Kondrashov Date: Thu, 10 Oct 2013 13:16:36 +0300 Subject: Move DEBUG macro body to debug_fn Move DEBUG macro body to the debug_fn function, adding "function" argument to the latter. Rename "debug_fn" in sssd_krb5_locator_plugin.c to "plugin_debug_fn" to remove conflict with the sssd debug_fn. Replace DEBUG_MSG macro usage with debug_fn function usage. Remove DEBUG_MSG macro along with tests. The above makes the total size of binaries drop by 20% for the standard Fedora build and by 44% for a build configured according to Debian packaging script. Reviewed-by: Jakub Hrozek Reviewed-by: Stephen Gallagher Reviewed-by: Simo Sorce --- src/tools/selinux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/tools') diff --git a/src/tools/selinux.c b/src/tools/selinux.c index 4f0c8c711..4555a486f 100644 --- a/src/tools/selinux.c +++ b/src/tools/selinux.c @@ -121,7 +121,8 @@ static void sss_semanage_error_callback(void *varg, return; } - DEBUG_MSG(level, "libsemanage", message); + if (DEBUG_IS_SET(level)) + debug_fn("libsemanage", level, "%s\n", message); free(message); } -- cgit