From 222dc8a239f7578cecdcb21523052140aa1192cf Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 21 Oct 2013 08:42:55 +0200 Subject: Util/ASCII: add StringEqualsCaseASCII() overload with length Replaces GLib's g_ascii_strncasecmp(). --- src/mixer/OssMixerPlugin.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/mixer') 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 - #include #include #include @@ -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; -- cgit v1.2.3