aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-21 08:42:55 +0200
committerMax Kellermann <max@duempel.org>2013-10-21 08:42:55 +0200
commit222dc8a239f7578cecdcb21523052140aa1192cf (patch)
tree3d5577e2d9092277e08de28f20766c01f87cc0ea /src/mixer
parent0e4d2e7277bc2adf18dd1e719ec4ce684f86d72b (diff)
downloadmpd-222dc8a239f7578cecdcb21523052140aa1192cf.tar.gz
mpd-222dc8a239f7578cecdcb21523052140aa1192cf.tar.xz
mpd-222dc8a239f7578cecdcb21523052140aa1192cf.zip
Util/ASCII: add StringEqualsCaseASCII() overload with length
Replaces GLib's g_ascii_strncasecmp().
Diffstat (limited to 'src/mixer')
-rw-r--r--src/mixer/OssMixerPlugin.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mixer/OssMixerPlugin.cxx b/src/mixer/OssMixerPlugin.cxx
index 5b533470b..0a459bc97 100644
--- a/src/mixer/OssMixerPlugin.cxx
+++ b/src/mixer/OssMixerPlugin.cxx
@@ -21,12 +21,11 @@
#include "MixerInternal.hxx"
#include "OutputAPI.hxx"
#include "system/fd_util.h"
+#include "util/ASCII.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
-#include <glib.h>
-
#include <assert.h>
#include <string.h>
#include <sys/stat.h>
@@ -71,7 +70,7 @@ oss_find_mixer(const char *name)
size_t name_length = strlen(name);
for (unsigned i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
- if (g_ascii_strncasecmp(name, labels[i], name_length) == 0 &&
+ if (StringEqualsCaseASCII(name, labels[i], name_length) &&
(labels[i][name_length] == 0 ||
labels[i][name_length] == ' '))
return i;