https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5daa7b07c868fd5a7db39…
commit 5daa7b07c868fd5a7db3922c0f83d29f864b6b59
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Aug 20 06:08:38 2018 +0900
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Aug 19 23:08:38 2018 +0200
[FONT][WIN32SS] Refactor the loop (1 of 5)
---
win32ss/gdi/ntgdi/freetype.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c
index e7a6cee516..5275b36576 100644
--- a/win32ss/gdi/ntgdi/freetype.c
+++ b/win32ss/gdi/ntgdi/freetype.c
@@ -266,16 +266,17 @@ RemoveCachedEntry(PFONT_CACHE_ENTRY Entry)
static void
RemoveCacheEntries(FT_Face Face)
{
- PLIST_ENTRY CurrentEntry;
+ PLIST_ENTRY CurrentEntry, NextEntry;
PFONT_CACHE_ENTRY FontEntry;
ASSERT_FREETYPE_LOCK_HELD();
- CurrentEntry = g_FontCacheListHead.Flink;
- while (CurrentEntry != &g_FontCacheListHead)
+ for (CurrentEntry = g_FontCacheListHead.Flink;
+ CurrentEntry != &g_FontCacheListHead;
+ CurrentEntry = NextEntry)
{
FontEntry = CONTAINING_RECORD(CurrentEntry, FONT_CACHE_ENTRY, ListEntry);
- CurrentEntry = CurrentEntry->Flink;
+ NextEntry = CurrentEntry->Flink;
if (FontEntry->Face == Face)
{