20 Sep
2011
20 Sep
'11
3:52 p.m.
On Tue, Sep 20, 2011 at 03:32:48PM +0200, Takashi Iwai wrote:
Mark Brown wrote:
*sigh* This sort of issue is why I'd prefer to just squash specific characters, especially given that we're just being random about what a valid character is.
Heh. Or just use a char *, such as
char *p; ... for (p = card->snd_card->driver; *p; p++) { if (*p != '_' && *p != '-' && !isalnum(*p)) *p = '_'; }
I find that a bit less legible, and I do like the ARRAY_SIZE() check for the warm and fuzzies. It's more just the listing all the characters bit. Anyway, is the last version OK for you?