Path is known to start with ??\ in this block, so strrchrW cannot ever return NULL, thus there is no reason to check for it.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/ntdll/path.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c index ccc95e3..d2e70bb 100644 --- a/dlls/ntdll/path.c +++ b/dlls/ntdll/path.c @@ -366,8 +366,8 @@ NTSTATUS WINAPI RtlDosPathNameToNtPathName_U_WithStatus(const WCHAR *dos_path, U ntpath->Buffer[1] = '?'; /* change \?\ to ??\ */ if (file_part) { - if ((ptr = strrchrW( ntpath->Buffer, '\' )) && ptr[1]) *file_part = ptr + 1; - else *file_part = NULL; + ptr = strrchrW(ntpath->Buffer, '\'); + *file_part = ptr[1] ? ptr + 1 : NULL; } return STATUS_SUCCESS; }