From ad70bb9866dd009a5fa74902692e67458d03469f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 11 Dec 2017 17:42:00 +0100 Subject: [PATCH] Get rid of unused filestream_get_ext --- libretro-common/include/streams/file_stream.h | 2 -- libretro-common/streams/file_stream.c | 17 ----------------- 2 files changed, 19 deletions(-) diff --git a/libretro-common/include/streams/file_stream.h b/libretro-common/include/streams/file_stream.h index ebcfa056d6..2ee44ec096 100644 --- a/libretro-common/include/streams/file_stream.h +++ b/libretro-common/include/streams/file_stream.h @@ -45,8 +45,6 @@ typedef struct RFILE RFILE; int64_t filestream_get_size(RFILE *stream); -const char *filestream_get_ext(RFILE *stream); - /** * filestream_open: * @path : path to file diff --git a/libretro-common/streams/file_stream.c b/libretro-common/streams/file_stream.c index 8c654d6351..36b9f94b3a 100644 --- a/libretro-common/streams/file_stream.c +++ b/libretro-common/streams/file_stream.c @@ -86,7 +86,6 @@ struct RFILE { unsigned hints; - char *ext; int64_t size; FILE *fp; @@ -111,13 +110,6 @@ struct RFILE char *buf; }; -const char *filestream_get_ext(RFILE *stream) -{ - if (!stream) - return NULL; - return stream->ext; -} - int64_t filestream_get_size(RFILE *stream) { if (!stream) @@ -278,12 +270,6 @@ RFILE *filestream_open(const char *path, unsigned mode, unsigned hints) #endif } - { - const char *ld = (const char*)strrchr(path, '.'); - if (ld) - stream->ext = strdup(ld + 1); - } - filestream_set_size(stream); return stream; @@ -493,9 +479,6 @@ int filestream_close(RFILE *stream) if (!stream) goto error; - if (!string_is_empty(stream->ext)) - free(stream->ext); - if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0) { if (stream->fp)