mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(file_ops.c) Cleanups
This commit is contained in:
parent
08f13ccc0d
commit
fad16b5c60
@ -87,11 +87,10 @@ bool write_file(const char *path, const void *data, ssize_t size)
|
||||
*/
|
||||
static int read_generic_file(const char *path, void **buf, ssize_t *len)
|
||||
{
|
||||
long ret = 0;
|
||||
long ret = 0;
|
||||
size_t content_buf_size = 0;
|
||||
void *content_buf = NULL;
|
||||
|
||||
FILE *file = fopen(path, "rb");
|
||||
FILE *file = fopen(path, "rb");
|
||||
|
||||
if (!file)
|
||||
goto error;
|
||||
@ -99,7 +98,7 @@ static int read_generic_file(const char *path, void **buf, ssize_t *len)
|
||||
if (fseek(file, 0, SEEK_END) != 0)
|
||||
goto error;
|
||||
|
||||
content_buf_size = ftell(file);
|
||||
content_buf_size = ftell(file);
|
||||
if (content_buf_size < 0)
|
||||
goto error;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user