Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv17882

Modified Files:
        init.c 
Log Message:
Updated the default id code

Index: init.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/init.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- init.c      4 Jun 2003 17:25:05 -0000       1.37
+++ init.c      6 Jun 2003 09:21:49 -0000       1.38
@@ -355,6 +355,10 @@
                id++;
        }
        id = card->id;
+       while (*spos != '\0' && !isalnum(*spos))
+               spos++;
+       if (isdigit(*spos))
+               *id++ = isalpha(card->shortname[0]) ? card->shortname[0] : 'D';
        while (*spos != '\0' && (size_t)(id - card->id) < sizeof(card->id) - 1) {
                if (isalnum(*spos))
                        *id++ = *spos;
@@ -363,6 +367,9 @@
        *id = '\0';
 
        id = card->id;
+       
+       if (*id == '\0')
+               strcpy(id, "default");
 
        while (1) {
                if (loops-- == 0) {
@@ -422,7 +429,7 @@
                write_unlock(&snd_card_rwlock);
                return 0;
        }
-       if (!card->id[0])
+       if (card->id[0] == '\0')
                choose_default_id(card);
        snd_cards[card->number] = card;
        snd_cards_count++;



-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to