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

index 94578a4..013c0bb 100644 (file)
@@ -4592,11 +4592,9 @@ FindBestFontFromList(FONTOBJ **FontObj, ULONG *MatchPenalty,
     Otm = ExAllocatePoolWithTag(PagedPool, OldOtmSize, GDITAG_TEXT);
 
     /* get the FontObj of lowest penalty */
     Otm = ExAllocatePoolWithTag(PagedPool, OldOtmSize, GDITAG_TEXT);
 
     /* get the FontObj of lowest penalty */
-    Entry = Head->Flink;
-    while (Entry != Head)
+    for (Entry = Head->Flink; Entry != Head; Entry = Entry->Flink)
     {
         CurrentEntry = CONTAINING_RECORD(Entry, FONT_ENTRY, ListEntry);
     {
         CurrentEntry = CONTAINING_RECORD(Entry, FONT_ENTRY, ListEntry);
-        Entry = Entry->Flink;
 
         FontGDI = CurrentEntry->Font;
         ASSERT(FontGDI);
 
         FontGDI = CurrentEntry->Font;
         ASSERT(FontGDI);