aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTravis Reitter <treitter@gmail.com>2010-07-09 02:18:20 +0800
committerTravis Reitter <treitter@gmail.com>2010-07-21 07:12:36 +0800
commit571d3f81c92099c569c061f38c1ac3b923c04637 (patch)
treeec629b4c6c93030b472e364754867b07a28722cc
parent151eb2b90cb579c7d538d0e3735e2d6157c57839 (diff)
downloadgsoc2013-empathy-571d3f81c92099c569c061f38c1ac3b923c04637.tar
gsoc2013-empathy-571d3f81c92099c569c061f38c1ac3b923c04637.tar.gz
gsoc2013-empathy-571d3f81c92099c569c061f38c1ac3b923c04637.tar.bz2
gsoc2013-empathy-571d3f81c92099c569c061f38c1ac3b923c04637.tar.lz
gsoc2013-empathy-571d3f81c92099c569c061f38c1ac3b923c04637.tar.xz
gsoc2013-empathy-571d3f81c92099c569c061f38c1ac3b923c04637.tar.zst
gsoc2013-empathy-571d3f81c92099c569c061f38c1ac3b923c04637.zip
Simplify empathy_folks_individual_contains_contact().
-rw-r--r--libempathy/empathy-utils.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 62e595c13..46dcf82d6 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;