summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2005-06-07 18:30:00 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2005-06-07 18:30:00 +0000
commit2258946855c8839f159596dfc60a63b6ccfc0347 (patch)
tree1769113ac26c17c5968090d0b3b4e437eda7f44e /apps
parent61716dd645f87d29f5bd10c22603ff3c5ad1babc (diff)
downloadrockbox-2258946855c8839f159596dfc60a63b6ccfc0347.zip
rockbox-2258946855c8839f159596dfc60a63b6ccfc0347.tar.gz
rockbox-2258946855c8839f159596dfc60a63b6ccfc0347.tar.bz2
rockbox-2258946855c8839f159596dfc60a63b6ccfc0347.tar.xz
Replaced rindex() with strrchr().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6596 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/playback.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 73a014c..d600fff 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -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;