Author: jgardou
Date: Thu Aug 7 10:59:54 2014
New Revision: 63829
URL:
http://svn.reactos.org/svn/reactos?rev=63829&view=rev
Log:
[WIN32K]
- Among a thousand ways to loop over a list, choose the simple one.
Modified:
trunk/reactos/win32ss/user/ntuser/menu.c
Modified: trunk/reactos/win32ss/user/ntuser/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.c…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] Thu Aug 7 10:59:54 2014
@@ -1143,7 +1143,6 @@
IntCleanupMenus(struct _EPROCESS *Process, PPROCESSINFO Win32Process)
{
PEPROCESS CurrentProcess;
- PLIST_ENTRY LastHead = NULL;
PMENU MenuObject;
CurrentProcess = PsGetCurrentProcess();
@@ -1152,10 +1151,8 @@
KeAttachProcess(&Process->Pcb);
}
- while (Win32Process->MenuListHead.Flink != &(Win32Process->MenuListHead)
&&
- Win32Process->MenuListHead.Flink != LastHead)
- {
- LastHead = Win32Process->MenuListHead.Flink;
+ while (!IsEmptyList(&Win32Process->MenuListHead))
+ {
MenuObject = CONTAINING_RECORD(Win32Process->MenuListHead.Flink, MENU,
ListEntry);
TRACE("Menus are stuck on the process list!\n");
IntDestroyMenuObject(MenuObject, FALSE, TRUE);