From c1c815b13d364cf5ccb65906bd5f66990f045a93 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sat, 20 May 2017 12:11:08 +0000 Subject: [PATCH] [WIN32K:NTGDI] - Simplify list walk in FindBestFontFromList svn path=/trunk/; revision=74605 --- reactos/win32ss/gdi/ntgdi/freetype.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/reactos/win32ss/gdi/ntgdi/freetype.c b/reactos/win32ss/gdi/ntgdi/freetype.c index 9479b3b6c76..18e682e308e 100644 --- a/reactos/win32ss/gdi/ntgdi/freetype.c +++ b/reactos/win32ss/gdi/ntgdi/freetype.c @@ -4354,6 +4354,8 @@ FindBestFontFromList(FONTOBJ **FontObj, ULONG *MatchPenalty, LOGFONTW *LogFont, while (Entry != Head) { CurrentEntry = CONTAINING_RECORD(Entry, FONT_ENTRY, ListEntry); + Entry = Entry->Flink; + FontGDI = CurrentEntry->Font; ASSERT(FontGDI); Face = FontGDI->SharedFace->Face; @@ -4363,8 +4365,6 @@ FindBestFontFromList(FONTOBJ **FontObj, ULONG *MatchPenalty, LOGFONTW *LogFont, Status = RtlAnsiStringToUnicodeString(&ActualNameW, &ActualNameA, TRUE); if (!NT_SUCCESS(Status)) { - /* next entry */ - Entry = Entry->Flink; continue; } @@ -4391,8 +4391,6 @@ FindBestFontFromList(FONTOBJ **FontObj, ULONG *MatchPenalty, LOGFONTW *LogFont, { RtlFreeUnicodeString(&ActualNameW); RtlFreeUnicodeString(&FullFaceNameW); - /* next entry */ - Entry = Entry->Flink; continue; } @@ -4414,9 +4412,6 @@ FindBestFontFromList(FONTOBJ **FontObj, ULONG *MatchPenalty, LOGFONTW *LogFont, /* free strings */ RtlFreeUnicodeString(&ActualNameW); - - /* next entry */ - Entry = Entry->Flink; } if (Otm) -- 2.17.1