alsa_mixer: use g_ascii_strcasecmp() instead of strcasecmp()
strcasecmp() is locale dependent, making it a bad choice for internal string comparisons.
This commit is contained in:
parent
05dfdfdb39
commit
9038882d95
@ -121,7 +121,7 @@ alsa_mixer_open(struct mixer *data)
|
|||||||
|
|
||||||
while (elem) {
|
while (elem) {
|
||||||
if (snd_mixer_elem_get_type(elem) == SND_MIXER_ELEM_SIMPLE) {
|
if (snd_mixer_elem_get_type(elem) == SND_MIXER_ELEM_SIMPLE) {
|
||||||
if ((strcasecmp(am->control,
|
if ((g_ascii_strcasecmp(am->control,
|
||||||
snd_mixer_selem_get_name(elem)) == 0) &&
|
snd_mixer_selem_get_name(elem)) == 0) &&
|
||||||
(am->index == snd_mixer_selem_get_index(elem))) {
|
(am->index == snd_mixer_selem_get_index(elem))) {
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user