@@ -242,23 +242,11 @@ int64_t retro_vfs_file_seek_internal(
242242#endif
243243#ifdef ATLEAST_VC2005
244244 /* VC2005 and up have a special 64-bit fseek */
245- if (_fseeki64 (stream -> fp , offset , whence ) != 0 )
246- return -1 ;
247- if ((val = _ftelli64 (stream -> fp )) < 0 )
248- return -1 ;
249- return val ;
245+ return _fseeki64 (stream -> fp , offset , whence );
250246#elif defined(HAVE_64BIT_OFFSETS )
251- if (fseeko (stream -> fp , (off_t )offset , whence ) != 0 )
252- return -1 ;
253- if ((val = ftello (stream -> fp )) < 0 )
254- return -1 ;
255- return val ;
247+ return fseeko (stream -> fp , (off_t )offset , whence );
256248#else
257- if (fseek (stream -> fp , (long )offset , whence ) != 0 )
258- return -1 ;
259- if ((val = ftell (stream -> fp )) < 0 )
260- return -1 ;
261- return val ;
249+ return fseek (stream -> fp , (long )offset , whence );
262250#endif
263251 }
264252#ifdef HAVE_MMAP
@@ -730,17 +718,11 @@ int64_t retro_vfs_file_tell_impl(libretro_vfs_implementation_file *stream)
730718#endif
731719#ifdef ATLEAST_VC2005
732720 /* VC2005 and up have a special 64-bit ftell */
733- if ((val = _ftelli64 (stream -> fp )) < 0 )
734- return -1 ;
735- return val ;
721+ return _ftelli64 (stream -> fp );
736722#elif defined(HAVE_64BIT_OFFSETS )
737- if ((val = ftello (stream -> fp )) < 0 )
738- return -1 ;
739- return val ;
723+ return ftello (stream -> fp );
740724#else
741- if ((val = ftell (stream -> fp )) < 0 )
742- return -1 ;
743- return val ;
725+ return ftell (stream -> fp );
744726#endif
745727 }
746728#ifdef HAVE_MMAP
0 commit comments