[alsa-devel] Question about card names

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Wed May 29 06:56:01 CEST 2019


Hi

> 		for (i = 0; i < ARRAY_SIZE(card->snd_card->driver); i++) {
> 			switch (card->snd_card->driver[i]) {
> x=>			case '_':
> x=>			case '-':
> 			case '\0':
> 				break;
> 			default:
> 				if (!isalnum(card->snd_card->driver[i]))
> 4=>					card->snd_card->driver[i] = '_';
> 				break;
> 			}
(snip)
> And, it seems in this loop, it breaks check if it finds "_" or "-" (= x).
> If my understanding was correct,
> the naming "abcd??efg" will be fixed to "abcd__efg",
> but, it do nothing if name was for example "-abcd??efg".
> Is this bug ??

Grr
This break is for "switch", not for "for"...


Thank you for your help !!
Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list