From 2258946855c8839f159596dfc60a63b6ccfc0347 Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Tue, 7 Jun 2005 18:30:00 +0000 Subject: Replaced rindex() with strrchr(). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6596 a1c6a512-1295-4272-9138-f99709370657 --- apps/playback.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/apps/playback.c b/apps/playback.c index 73a014c9a9..d600fff667 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; -- cgit v1.2.3