From 5a55772201829dc0055cc8d3022cc475ccbc2643 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Sun, 8 Feb 2009 11:09:55 +0000 Subject: Small code reuse improvement git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19943 a1c6a512-1295-4272-9138-f99709370657 --- apps/metadata/metadata_common.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'apps/metadata') diff --git a/apps/metadata/metadata_common.c b/apps/metadata/metadata_common.c index 94ff212cea..09f0f94a88 100644 --- a/apps/metadata/metadata_common.c +++ b/apps/metadata/metadata_common.c @@ -29,6 +29,7 @@ #include "metadata_common.h" #include "metadata_parsers.h" #include "replaygain.h" +#include "misc.h" /* Skip an ID3v2 tag if it can be found. We assume the tag is located at the * start of the file, which should be true in all cases where we need to skip it. @@ -173,16 +174,6 @@ long get_slong(void* buf) return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24); } -static char* skip_space(char* str) -{ - while (isspace(*str)) - { - str++; - } - - return str; -} - unsigned long get_itunes_int32(char* value, int count) { static const char hexdigits[] = "0123456789ABCDEF"; @@ -191,7 +182,7 @@ unsigned long get_itunes_int32(char* value, int count) while (count-- > 0) { - value = skip_space(value); + value = skip_whitespace(value); while (*value && !isspace(*value)) { @@ -199,7 +190,7 @@ unsigned long get_itunes_int32(char* value, int count) } } - value = skip_space(value); + value = skip_whitespace(value); while (*value && ((c = strchr(hexdigits, toupper(*value))) != NULL)) { -- cgit v1.2.3