aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-chat.c
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2009-06-19 04:29:31 +0800
committerWill Thompson <will.thompson@collabora.co.uk>2009-06-19 17:04:41 +0800
commitfdbb5ae44e2b82a36f7103b63e5c8a2041faea6c (patch)
tree2e0acb379c6bec2b17e3b49eb41ce63605ea7992 /libempathy/empathy-tp-chat.c
parenta0813b0a5b90e959994f0f6f029af30364ddd258 (diff)
downloadgsoc2013-empathy-fdbb5ae44e2b82a36f7103b63e5c8a2041faea6c.tar
gsoc2013-empathy-fdbb5ae44e2b82a36f7103b63e5c8a2041faea6c.tar.gz
gsoc2013-empathy-fdbb5ae44e2b82a36f7103b63e5c8a2041faea6c.tar.bz2
gsoc2013-empathy-fdbb5ae44e2b82a36f7103b63e5c8a2041faea6c.tar.lz
gsoc2013-empathy-fdbb5ae44e2b82a36f7103b63e5c8a2041faea6c.tar.xz
gsoc2013-empathy-fdbb5ae44e2b82a36f7103b63e5c8a2041faea6c.tar.zst
gsoc2013-empathy-fdbb5ae44e2b82a36f7103b63e5c8a2041faea6c.zip
Style: avoid marching off the right margin
Diffstat (limited to 'libempathy/empathy-tp-chat.c')
-rw-r--r--libempathy/empathy-tp-chat.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 8327c4f26..6810476d1 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -886,17 +886,18 @@ chat_lookup_contact (EmpathyTpChat *chat,
for (l = priv->members; l; l = l->next) {
EmpathyContact *c = l->data;
- if (empathy_contact_get_handle (c) == handle) {
- if (remove) {
- /* Caller takes the reference. */
- priv->members = g_list_delete_link (
- priv->members, l);
- } else {
- g_object_ref (c);
- }
+ if (empathy_contact_get_handle (c) != handle) {
+ continue;
+ }
- return c;
+ if (remove) {
+ /* Caller takes the reference. */
+ priv->members = g_list_delete_link (priv->members, l);
+ } else {
+ g_object_ref (c);
}
+
+ return c;
}
return NULL;