From 571d3f81c92099c569c061f38c1ac3b923c04637 Mon Sep 17 00:00:00 2001 From: Travis Reitter Date: Thu, 8 Jul 2010 11:18:20 -0700 Subject: Simplify empathy_folks_individual_contains_contact(). --- libempathy/empathy-utils.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'libempathy/empathy-utils.c') 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; -- cgit