aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-28 20:33:56 +0100
committerMax Kellermann <max@duempel.org>2008-10-28 20:33:56 +0100
commit016d996131d560db6d72476ae29c74df84746fff (patch)
treec22a7d13e1b39927e70e73cbc8f78762fba0d92a /src/audio.c
parent4a71f66256d02c46bc2bb3665cc6451a2101d5ac (diff)
downloadmpd-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/audio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/audio.c b/src/audio.c
index ce8b06151..bfebac4fc 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -28,6 +28,8 @@
#include "utils.h"
#include "os_compat.h"
+#include <glib.h>
+
#define AUDIO_DEVICE_STATE "audio_device_state:"
#define AUDIO_BUFFER_SIZE 2*MPD_PATH_MAX
@@ -434,7 +436,7 @@ void readAudioDevicesState(FILE *fp)
while (myFgets(buffer, AUDIO_BUFFER_SIZE, fp)) {
char *c, *name;
- if (prefixcmp(buffer, AUDIO_DEVICE_STATE))
+ if (!g_str_has_prefix(buffer, AUDIO_DEVICE_STATE))
continue;
c = strchr(buffer, ':');