changeset 56842:6bd9ebab1440

macmenu.c (mac_menu_show): Remove shadowing of menu variable by using different names for inner loop variables.
author Steven Tamm <steventamm@mac.com>
date Mon, 30 Aug 2004 18:06:21 +0000
parents 8cb61798f706
children 4520af567a84
files src/ChangeLog src/macmenu.c
diffstat 2 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Aug 30 16:05:47 2004 +0000
+++ b/src/ChangeLog	Mon Aug 30 18:06:21 2004 +0000
@@ -1,3 +1,8 @@
+2004-08-30  Steven Tamm  <steventamm@mac.com>
+
+	* macmenu.c (mac_menu_show): Remove shadowing of menu variable
+	by using different names for inner loop variables.
+
 2004-08-27  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
 
 	* xmenu.c (set_frame_menubar): Reintroduce inhibit_garbage_collection
--- a/src/macmenu.c	Mon Aug 30 16:05:47 2004 +0000
+++ b/src/macmenu.c	Mon Aug 30 18:06:21 2004 +0000
@@ -1807,9 +1807,9 @@
   /* Get the refcon to find the correct item*/
   if (menu_item_selection)
     {
-      menu = GetMenuHandle (HiWord (menu_item_choice));
-      if (menu) {
-	GetMenuItemRefCon (menu, menu_item_selection, &refcon);
+      MenuHandle sel_menu = GetMenuHandle (HiWord (menu_item_choice));
+      if (sel_menu) {
+	GetMenuItemRefCon (sel_menu, menu_item_selection, &refcon);
       }
     }
 
@@ -1831,11 +1831,11 @@
   {
     int i = MIN_POPUP_SUBMENU_ID;
     MenuHandle submenu = GetMenuHandle (i);
-    while (menu != NULL)
+    while (submenu != NULL)
       {
 	DeleteMenu (i);
-	DisposeMenu (menu);
-	menu = GetMenuHandle (++i);
+	DisposeMenu (submenu);
+	submenu = GetMenuHandle (++i);
       }
   }