diff options
author | Max Kellermann <max@duempel.org> | 2008-10-28 20:33:56 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-28 20:33:56 +0100 |
commit | 016d996131d560db6d72476ae29c74df84746fff (patch) | |
tree | c22a7d13e1b39927e70e73cbc8f78762fba0d92a /src/decoder/mp3_plugin.c | |
parent | 4a71f66256d02c46bc2bb3665cc6451a2101d5ac (diff) | |
download | mpd-016d996131d560db6d72476ae29c74df84746fff.tar.gz mpd-016d996131d560db6d72476ae29c74df84746fff.tar.xz mpd-016d996131d560db6d72476ae29c74df84746fff.zip |
utils: use g_str_has_prefix() instead of prefixcmp()
Remove duplicated code from MPD.
Diffstat (limited to 'src/decoder/mp3_plugin.c')
-rw-r--r-- | src/decoder/mp3_plugin.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/decoder/mp3_plugin.c b/src/decoder/mp3_plugin.c index 330ba668f..68f786106 100644 --- a/src/decoder/mp3_plugin.c +++ b/src/decoder/mp3_plugin.c @@ -21,6 +21,7 @@ #include "../utils.h" #include "../conf.h" +#include <glib.h> #include <mad.h> #ifdef HAVE_ID3TAG @@ -564,7 +565,7 @@ static int parse_lame(struct lame *lame, struct mad_bitptr *ptr, int *bitlen) /* This is technically incorrect, since the encoder might not be lame. * But there's no other way to determine if this is a lame tag, and we * wouldn't want to go reading a tag that's not there. */ - if (prefixcmp(lame->encoder, "LAME")) + if (!g_str_has_prefix(lame->encoder, "LAME")) return 0; if (sscanf(lame->encoder+4, "%u.%u", |