From 7fd86cf94f40b990765e43d9a320c71cfde82aac Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 14 Oct 2010 06:58:53 -0500 Subject: gatchat: quit early if the group id doesn't match If the ID of the notify matches but the group id does not match it means that the unregister is being called with an id that does not belong to that particular group. Checking further entries is no longer necessary. --- gatchat/gatchat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gatchat/gatchat.c') diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c index e85d9086..cfe21887 100644 --- a/gatchat/gatchat.c +++ b/gatchat/gatchat.c @@ -1085,7 +1085,7 @@ static gboolean at_chat_unregister(struct at_chat *chat, guint group, guint id) node = l->data; if (node->gid != group) - continue; + return FALSE; at_notify_node_destroy(node, NULL); notify->nodes = g_slist_remove(notify->nodes, node); -- cgit v1.2.3