From 24d0f4095926438aa037eee9101214889fd47495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Sun, 15 Nov 2015 20:36:11 -0300 Subject: [PATCH] (retro_file) Small cleanup in fopen() --- libretro-common/file/retro_file.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libretro-common/file/retro_file.c b/libretro-common/file/retro_file.c index 70defb85f8..8978bb038c 100644 --- a/libretro-common/file/retro_file.c +++ b/libretro-common/file/retro_file.c @@ -217,12 +217,8 @@ RFILE *retro_fopen(const char *path, unsigned mode, ssize_t len) { stream->mappos = 0; stream->mapped = NULL; - stream->mapsize = 0; + stream->mapsize = retro_fseek(stream, 0, SEEK_END); - if (retro_fseek(stream, 0, SEEK_END) != 0) - goto error; - - stream->mapsize = retro_ftell(stream); if (stream->mapsize == (uint64_t)-1) goto error;