Matteo Bruni (@Mystral) commented about dlls/ntdll/tests/file.c:
}
+#define lok ok_(__FILE__, line) +#define rename_file(h,f) rename_file_(__LINE__,(h),(f)) +static BOOL rename_file_( int line, HANDLE h, const WCHAR *filename ) +{
- FILE_RENAME_INFORMATION *fri;
- UNICODE_STRING ntpath;
- IO_STATUS_BLOCK io;
- NTSTATUS status;
- BOOLEAN ret;
- ULONG size;
- ret = pRtlDosPathNameToNtPathName_U( filename, &ntpath, NULL, NULL );
- lok( ret, "RtlDosPathNameToNtPathName_U failed\n" );
- if (!ret) return FALSE;
Please get rid of the ok() and if() {}, we can just assume that the RtlDosPathNameToNtPathName_U() call works correctly (i.e. if it fails we have bigger problems and arguably crashing and burning is better than reporting a failure and silently skipping the test).