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/volume.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 '')
-rw-r--r-- | src/volume.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/volume.c b/src/volume.c index cca5860e3..8e27dae38 100644 --- a/src/volume.c +++ b/src/volume.c @@ -26,6 +26,8 @@ #include "../config.h" +#include <glib.h> + #ifdef HAVE_OSS #include <sys/soundcard.h> #endif @@ -518,7 +520,7 @@ void read_sw_volume_state(FILE *fp) if (volume_mixerType != VOLUME_MIXER_TYPE_SOFTWARE) return; while (myFgets(buf, sizeof(buf), fp)) { - if (prefixcmp(buf, SW_VOLUME_STATE)) + if (!g_str_has_prefix(buf, SW_VOLUME_STATE)) continue; sv = strtol(buf + strlen(SW_VOLUME_STATE), &end, 10); if (mpd_likely(!*end)) |