]> git.0d.be Git - empathy.git/commitdiff
Simplify empathy_folks_individual_contains_contact().
authorTravis Reitter <treitter@gmail.com>
Thu, 8 Jul 2010 18:18:20 +0000 (11:18 -0700)
committerTravis Reitter <treitter@gmail.com>
Tue, 20 Jul 2010 23:12:36 +0000 (16:12 -0700)
libempathy/empathy-utils.c

index 62e595c136f0b9285383446373e49471c646a83c..46dcf82d69782848c1e2aced1e761d13f156ee3b 100644 (file)
@@ -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;