From efee8149e2ccd062386aca8bd5444f7ac461219d Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 4 Jul 2024 07:23:13 +0300 Subject: [PATCH] filesystem: remove unneeded cast to fs_offset_t in write() call --- filesystem/filesystem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/filesystem/filesystem.c b/filesystem/filesystem.c index 964008f3..870d4325 100644 --- a/filesystem/filesystem.c +++ b/filesystem/filesystem.c @@ -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 )