https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7b04962aed7f6d017d4bebb8dc5175f87ef9ed1e

commit 7b04962aed7f6d017d4bebb8dc5175f87ef9ed1e
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Sun Aug 19 13:39:02 2018 +0900
Commit:     Mark Jansen <[email protected]>
CommitDate: Sun Aug 19 23:05:04 2018 +0200

    [FONT][WIN32SS] Refactor the loop (5 of 5)
---
 win32ss/gdi/ntgdi/freetype.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c
index 94578a4047..013c0bb6a4 100644
--- a/win32ss/gdi/ntgdi/freetype.c
+++ b/win32ss/gdi/ntgdi/freetype.c
@@ -4592,11 +4592,9 @@ FindBestFontFromList(FONTOBJ **FontObj, ULONG 
*MatchPenalty,
     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);
-        Entry = Entry->Flink;
 
         FontGDI = CurrentEntry->Font;
         ASSERT(FontGDI);

Reply via email to