From ca4dc435ab0c1af2b5fc72e9b6eb0c286630ddd4 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 2 Jun 2012 19:37:10 -0500 Subject: In user_menu_mgr_rebuild_items(), reduce the scope of some temporary variables --- src/user-menu-mgr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c index 3f4bdc4..b7f61cf 100644 --- a/src/user-menu-mgr.c +++ b/src/user-menu-mgr.c @@ -100,10 +100,7 @@ user_menu_mgr_class_init (UserMenuMgrClass *klass) static void user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) { - DbusmenuMenuitem *mi = NULL; - DbusmenuMenuitem *guest_mi = NULL; GList *u; - UserData *user; gboolean can_activate; GList *children; @@ -163,6 +160,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) if ( !is_this_guest_session () && guest_enabled) { + DbusmenuMenuitem *guest_mi = NULL; guest_mi = dbusmenu_menuitem_new (); dbusmenu_menuitem_property_set (guest_mi, DBUSMENU_MENUITEM_PROP_TYPE, @@ -193,6 +191,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) } for (u = users; u != NULL; u = g_list_next (u)) { + UserData *user; user = u->data; g_debug ("%s: %s", user->user_name, user->real_name); user->service = self->users_dbus_interface; @@ -204,7 +203,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) } if (self->user_count > MINIMUM_USERS) { - mi = dbusmenu_menuitem_new (); + DbusmenuMenuitem * mi = dbusmenu_menuitem_new (); dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_TYPE, USER_ITEM_TYPE); -- cgit v1.2.3