Re: [patch][2.5.4-dj4] cleanup to use strsep for fs/fat/inode.c

From: René Scharfe (l.s.r@web.de)
Date: Sun Feb 10 2002 - 08:19:18 EST


Hi,

> This patch changes all use of strtok() to strsep().
> Strtok() isn't SMP/thread safe. strsep is considered safer.

OK, but ...

> - for (this_char = strtok(options,","); this_char;
> - this_char = strtok(NULL,",")) {

This _does not_ change the value of 'options'.

> + while ((this_char = strsep(&options,",")) != NULL) {

This _does_ change the value of 'options'. Problem is, it's
used later. Same is true for your patch to fs/vfat/namei.c.

René
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 15 2002 - 21:00:32 EST