[telepathy-glib/master] fd.o#23843: tp_debug_sender_log_handler: correct logic for exclude=NULL to exclude nothing

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Sep 10 09:55:49 PDT 2009


Also elide an unnecessary variable.
---
 telepathy-glib/debug-sender.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/telepathy-glib/debug-sender.c b/telepathy-glib/debug-sender.c
index ce42bec..0660ac8 100644
--- a/telepathy-glib/debug-sender.c
+++ b/telepathy-glib/debug-sender.c
@@ -446,17 +446,12 @@ tp_debug_sender_log_handler (const gchar *log_domain,
     const gchar *message,
     gpointer exclude)
 {
-  const gchar *domain_exclude = NULL;
-
   g_log_default_handler (log_domain, log_level, message, NULL);
 
   if (debug_sender == NULL)
     return;
 
-  if (exclude != NULL)
-    domain_exclude = (gchar *) exclude;
-
-  if (domain_exclude != NULL && tp_strdiff (log_domain, domain_exclude))
+  if (exclude == NULL || tp_strdiff (log_domain, exclude))
     {
       GTimeVal now;
       g_get_current_time (&now);
-- 
1.5.6.5




More information about the telepathy-commits mailing list