[FONT][WIN32SS] Refactor the loop (2 of 5)
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Sun, 19 Aug 2018 04:36:31 +0000 (13:36 +0900)
committerMark Jansen <mark.jansen@reactos.org>
Sun, 19 Aug 2018 21:07:37 +0000 (23:07 +0200)
win32ss/gdi/ntgdi/freetype.c

index 97d4b2d..e7a6cee 100644 (file)
@@ -1344,8 +1344,9 @@ IntGdiRemoveFontMemResource(HANDLE hMMFont)
     PPROCESSINFO Win32Process = PsGetCurrentProcessWin32Process();
 
     IntLockProcessPrivateFonts(Win32Process);
-    Entry = Win32Process->PrivateMemFontListHead.Flink;
-    while (Entry != &Win32Process->PrivateMemFontListHead)
+    for (Entry = Win32Process->PrivateMemFontListHead.Flink;
+         Entry != &Win32Process->PrivateMemFontListHead;
+         Entry = Entry->Flink)
     {
         CurrentEntry = CONTAINING_RECORD(Entry, FONT_ENTRY_COLL_MEM, ListEntry);
 
@@ -1355,8 +1356,6 @@ IntGdiRemoveFontMemResource(HANDLE hMMFont)
             UnlinkFontMemCollection(CurrentEntry);
             break;
         }
-
-        Entry = Entry->Flink;
     }
     IntUnLockProcessPrivateFonts(Win32Process);