[empathy] Simplify empathy_folks_individual_contains_contact().



commit 571d3f81c92099c569c061f38c1ac3b923c04637
Author: Travis Reitter <treitter gmail com>
Date:   Thu Jul 8 11:18:20 2010 -0700

    Simplify empathy_folks_individual_contains_contact().

 libempathy/empathy-utils.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 62e595c..46dcf82 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -582,15 +582,8 @@ empathy_folks_individual_contains_contact (FolksIndividual *individual)
   personas = folks_individual_get_personas (individual);
   for (l = personas; l != NULL; l = l->next)
     {
-      TpfPersona *persona = l->data;
-
-      if (TPF_IS_PERSONA (persona))
-        {
-          TpContact *contact = tpf_persona_get_contact (persona);
-
-          if (TP_IS_CONTACT (contact))
-            return TRUE;
-        }
+      if (TPF_IS_PERSONA (l->data))
+        return (tpf_persona_get_contact (TPF_PERSONA (l->data)) != NULL);
     }
 
   return FALSE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]