diff options
author | Chengwei Yang <chengwei.yang@intel.com> | 2013-08-23 16:49:39 +0800 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-08-23 11:51:18 +0100 |
commit | 82600c61dcb715e1651faaa4b5e577fca90bc35d (patch) | |
tree | 8a8411c2347e8ccd7097f937dcec1a8a4f5dca65 /bus | |
parent | 73ded5c619cbf001efa8aa216edcdccec9b2751c (diff) | |
download | dbus-82600c61dcb715e1651faaa4b5e577fca90bc35d.tar.gz |
Cleanup: polish verbose mode checking
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'bus')
-rw-r--r-- | bus/selinux.c | 19 | ||||
-rw-r--r-- | bus/signals.c | 2 |
2 files changed, 5 insertions, 16 deletions
diff --git a/bus/selinux.c b/bus/selinux.c index 36287e9f..57c94326 100644 --- a/bus/selinux.c +++ b/bus/selinux.c @@ -936,8 +936,7 @@ bus_selinux_get_policy_root (void) void bus_selinux_id_table_print (DBusHashTable *service_table) { -#ifdef DBUS_ENABLE_VERBOSE_MODE -#ifdef HAVE_SELINUX +#if defined (DBUS_ENABLE_VERBOSE_MODE) && defined (HAVE_SELINUX) DBusHashIter iter; if (!selinux_enabled) @@ -953,19 +952,17 @@ bus_selinux_id_table_print (DBusHashTable *service_table) _dbus_verbose ("The context is %s\n", sid->ctx); _dbus_verbose ("The refcount is %d\n", sid->refcnt); } -#endif /* HAVE_SELINUX */ -#endif /* DBUS_ENABLE_VERBOSE_MODE */ +#endif /* DBUS_ENABLE_VERBOSE_MODE && HAVE_SELINUX */ } -#ifdef DBUS_ENABLE_VERBOSE_MODE -#ifdef HAVE_SELINUX /** * Print out some AVC statistics. */ static void bus_avc_print_stats (void) { +#if defined (DBUS_ENABLE_VERBOSE_MODE) && defined (HAVE_SELINUX) struct avc_cache_stats cstats; if (!selinux_enabled) @@ -983,9 +980,8 @@ bus_avc_print_stats (void) _dbus_verbose ("CAV hits: %d\n", cstats.cav_hits); _dbus_verbose ("CAV probes: %d\n", cstats.cav_probes); _dbus_verbose ("CAV misses: %d\n", cstats.cav_misses); +#endif /* DBUS_ENABLE_VERBOSE_MODE && HAVE_SELINUX */ } -#endif /* HAVE_SELINUX */ -#endif /* DBUS_ENABLE_VERBOSE_MODE */ /** @@ -1005,12 +1001,7 @@ bus_selinux_shutdown (void) sidput (bus_sid); bus_sid = SECSID_WILD; -#ifdef DBUS_ENABLE_VERBOSE_MODE - - if (_dbus_is_verbose()) - bus_avc_print_stats (); - -#endif /* DBUS_ENABLE_VERBOSE_MODE */ + bus_avc_print_stats (); avc_destroy (); #ifdef HAVE_LIBAUDIT diff --git a/bus/signals.c b/bus/signals.c index 72487edd..dab7154a 100644 --- a/bus/signals.c +++ b/bus/signals.c @@ -1980,12 +1980,10 @@ get_recipients_from_list (DBusList **rules, if (!_dbus_list_append (recipients_p, rule->matches_go_to)) return FALSE; } -#ifdef DBUS_ENABLE_VERBOSE_MODE else { _dbus_verbose ("Connection already receiving this message, so not adding again\n"); } -#endif /* DBUS_ENABLE_VERBOSE_MODE */ } link = _dbus_list_get_next_link (rules, link); |