Module: wine Branch: master Commit: 59e1d114a407a358157d316e8ba09febd3b00b1d URL: https://source.winehq.org/git/wine.git/?a=commit;h=59e1d114a407a358157d316e8...
Author: Alexandre Julliard julliard@winehq.org Date: Tue May 7 11:31:05 2019 -0500
kernel32: Use strncmpiW instead of memicmpW for strings without embedded nulls.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/kernel32/file.c | 2 +- dlls/kernel32/process.c | 2 +- dlls/kernel32/volume.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c index 6c82613..30c8dbd 100644 --- a/dlls/kernel32/file.c +++ b/dlls/kernel32/file.c @@ -1521,7 +1521,7 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing, static const WCHAR conW[] = {'C','O','N'};
if (LOWORD(dosdev) == sizeof(conW) && - !memicmpW( filename + HIWORD(dosdev)/sizeof(WCHAR), conW, ARRAY_SIZE( conW ))) + !strncmpiW( filename + HIWORD(dosdev)/sizeof(WCHAR), conW, ARRAY_SIZE( conW ))) { switch (access & (GENERIC_READ|GENERIC_WRITE)) { diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 09f0433..09ab077 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -550,7 +550,7 @@ static void set_registry_variables( HANDLE hkey, ULONG type ) } /* PATH is magic */ if (env_name.Length == sizeof(pathW) && - !memicmpW( env_name.Buffer, pathW, ARRAY_SIZE( pathW )) && + !strncmpiW( env_name.Buffer, pathW, ARRAY_SIZE( pathW )) && !RtlQueryEnvironmentVariable_U( NULL, &env_name, &tmp )) { RtlAppendUnicodeToString( &tmp, sep ); diff --git a/dlls/kernel32/volume.c b/dlls/kernel32/volume.c index 1208436..4fd913a 100644 --- a/dlls/kernel32/volume.c +++ b/dlls/kernel32/volume.c @@ -1942,7 +1942,7 @@ BOOL WINAPI GetVolumePathNamesForVolumeNameW(LPCWSTR volumename, LPWSTR volumepa linkname = (const WCHAR *)((const char *)link + link->MountPoints[j].SymbolicLinkNameOffset);
if (link->MountPoints[j].SymbolicLinkNameLength == sizeof(dosdevicesW) + 2 * sizeof(WCHAR) && - !memicmpW( linkname, dosdevicesW, ARRAY_SIZE( dosdevicesW ))) + !strncmpiW( linkname, dosdevicesW, ARRAY_SIZE( dosdevicesW ))) { len += 4; if (volumepathname && len < buflen)