1
0
Fork 0
forked from len0rd/rockbox

Replaced rindex() with strrchr().

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6596 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2005-06-07 18:30:00 +00:00
parent 61716dd645
commit 2258946855

View file

@ -350,28 +350,12 @@ bool codec_seek_buffer_callback(off_t newpos)
return true;
}
char *rindex(const char *s, int c)
{
char *p = NULL;
if (s == NULL)
return NULL;
while (*s != '\0') {
if (*s == c)
p = (char *)s;
s++;
}
return p;
}
/* Simple file type probing by looking filename extension. */
int probe_file_format(const char *filename)
{
char *suffix;
suffix = rindex(filename, '.');
suffix = strrchr(filename, '.');
if (suffix == NULL)
return AFMT_UNKNOWN;
suffix += 1;