[PATCH] version: Simplify null check in VerQueryValueW
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/version/version.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/version/version.c b/dlls/version/version.c index 5299ecd32f..bd03b2be80 100644 --- a/dlls/version/version.c +++ b/dlls/version/version.c @@ -1054,7 +1054,6 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock, BOOL WINAPI VerQueryValueW( LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen ) { - static const WCHAR nullW[] = { 0 }; static const WCHAR rootW[] = { '\\', 0 }; static const WCHAR varfileinfoW[] = { '\\','V','a','r','F','i','l','e','I','n','f','o', '\\','T','r','a','n','s','l','a','t','i','o','n', 0 }; @@ -1067,7 +1066,7 @@ BOOL WINAPI VerQueryValueW( LPCVOID pBlock, LPCWSTR lpSubBlock, if (!pBlock) return FALSE; - if (lpSubBlock == NULL || lpSubBlock[0] == nullW[0]) + if (!lpSubBlock || !lpSubBlock[0]) lpSubBlock = rootW; if ( VersionInfoIs16( info ) ) -- 2.19.1
Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=43656 Your paranoid android. === debian9 (build log) === Global symbol "$Running" requires explicit package name (did you forget to declare "my $Running"?) at ../bin/build/WineTest.pl line 87. === debian9 (build log) === Global symbol "$Running" requires explicit package name (did you forget to declare "my $Running"?) at ../bin/build/WineTest.pl line 87.
participants (2)
-
Alex Henrie -
Marvin