2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 01:45:19 +01:00

filesystem: remove unneeded cast to fs_offset_t in write() call

This commit is contained in:
Alibek Omarov 2024-07-04 07:23:13 +03:00
parent bc32f37fce
commit efee8149e2

View File

@ -2047,8 +2047,10 @@ int FS_Close( file_t *file )
FS_BackupFileName( file, NULL, 0 );
if( file->handle >= 0 )
{
if( close( file->handle ))
return EOF;
}
Mem_Free( file );
return 0;
@ -2101,7 +2103,7 @@ fs_offset_t FS_Write( file_t *file, const void *data, size_t datasize )
FS_Purge( file );
// write the buffer and update the position
result = write( file->handle, data, (fs_offset_t)datasize );
result = write( file->handle, data, datasize );
file->position = lseek( file->handle, 0, SEEK_CUR );
if( file->real_length < file->position )