From 5dfe3455db5d8c21a326178006ae8dab9c71fc4b Mon Sep 17 00:00:00 2001 From: Kyle Katarn Date: Mon, 4 May 2020 22:30:36 +0200 Subject: [PATCH] [ADVAPI32] Fix undue debug print in nominal case (#2734) In current implementation, when regedit opens HKCR root key, an error is logged err:(dll/win32/advapi32/reg/hkcr.c:964) Returning 259. This is not correct as the code 259 is ERROR_NO_MORE_ITEMS which is the nominal return value when end of enumeration is reached. --- dll/win32/advapi32/reg/hkcr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dll/win32/advapi32/reg/hkcr.c b/dll/win32/advapi32/reg/hkcr.c index 2756685d5fb..7d714f48388 100644 --- a/dll/win32/advapi32/reg/hkcr.c +++ b/dll/win32/advapi32/reg/hkcr.c @@ -961,7 +961,8 @@ EnumHKCRValue( if (ErrorCode != ERROR_SUCCESS) { /* Most likely ERROR_NO_MORE_ITEMS */ - ERR("Returning %d.\n", ErrorCode); + if (ErrorCode != ERROR_NO_MORE_ITEMS) + ERR("Returning %d.\n", ErrorCode); goto Exit; } FallbackValueName[FallbackValueNameLen] = L'\0';