Get rid of unused filestream_get_ext
This commit is contained in:
parent
43c9bb374d
commit
ad70bb9866
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue