Matteo Bruni (@Mystral) commented about dlls/ntdll/tests/file.c:
- if (!ret) return FALSE;
- size = offsetof( FILE_RENAME_INFORMATION, FileName ) + ntpath.Length;
- fri = HeapAlloc( GetProcessHeap(), 0, size );
- lok( fri != NULL, "HeapAlloc failed\n" );
- if (!fri) return FALSE;
- fri->ReplaceIfExists = TRUE;
- fri->RootDirectory = NULL;
- fri->FileNameLength = ntpath.Length;
- memcpy( fri->FileName, ntpath.Buffer, ntpath.Length );
- pRtlFreeUnicodeString( &ntpath );
- status = pNtSetInformationFile( h, &io, fri, size, FileRenameInformation );
- HeapFree( GetProcessHeap(), 0, fri );
- lok( status == STATUS_SUCCESS, "got %#lx\n", status );
- return status == STATUS_SUCCESS;
Let's get rid of the return and make the function void.