Update of /cvsroot/alsa/alsa-kernel/include In directory sc8-pr-cvs1:/tmp/cvs-serv13563
Modified Files: initval.h Log Message: A try to fix get_id() function - use alloc_bootmem() Index: initval.h =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/include/initval.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- initval.h 30 Oct 2003 14:21:07 -0000 1.17 +++ initval.h 27 Dec 2003 09:03:01 -0000 1.18 @@ -138,27 +138,24 @@ #include <linux/init.h> static int __init get_id(char **str, char **dst) { - char *s, *d; + char *s; if (!(*str) || !(**str)) return 0; for (s = *str; isalpha(*s) || isdigit(*s) || *s == '_'; s++); if (s != *str) { - *dst = (char *)kmalloc((s - *str) + 1, GFP_KERNEL); - s = *str; d = *dst; - while (isalpha(*s) || isdigit(*s) || *s == '_') { - if (d != NULL) - *d++ = *s; - s++; + int len = s - *str; + char *d = (char *)alloc_bootmem(len + 1); + if (d != NULL) { + memcpy(*dst = d, *str, len); + d[len] = '\0'; } - if (d != NULL) - *d = '\0'; } - *str = s; if (*s == ',') { - (*str)++; + *str = s + 1; return 2; } + *str = s; return 1; } #endif ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog