[Pkg-telepathy-commits] [empathy] 28/39: menu_removed_cb: call g_menu_model_get_n_items() once

Simon McVittie smcv at debian.org
Wed Jan 29 12:53:14 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository empathy.

commit dda3f6c4ee2e695dbc111023dc9fa7fa53ab4827
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Wed Sep 11 16:24:42 2013 +0200

    menu_removed_cb: call g_menu_model_get_n_items() once
    
    No need to call it during each iteration.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707885
---
 src/empathy-roster-window.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c
index 8280861..5b4e987 100644
--- a/src/empathy-roster-window.c
+++ b/src/empathy-roster-window.c
@@ -1341,10 +1341,11 @@ roster_window_favorite_chatroom_menu_removed_cb (
     EmpathyRosterWindow *self)
 {
   GList *chatrooms;
-  gint i;
+  guint i, n;
 
-  for (i = 0; i < g_menu_model_get_n_items (
-        G_MENU_MODEL (self->priv->rooms_section)); i++)
+  n = g_menu_model_get_n_items (G_MENU_MODEL (self->priv->rooms_section));
+
+  for (i = 0; i < n; i++)
     {
       const gchar *name;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/empathy.git



More information about the Pkg-telepathy-commits mailing list