From: "Alex Scheele" <alex@packetstorm.nu>
To: <chaffee@cs.berkeley.edu>
Cc: "Dave Jones" <davej@suse.de>, "Lkml" <linux-kernel@vger.kernel.org>
Subject: [patch][2.5.4-dj4] cleanup to use strsep in
Date: Sun, 10 Feb 2002 02:40:40 +0100 [thread overview]
Message-ID: <IOEMLDKDBECBHMIOCKODEEMCCJAA.alex@packetstorm.nu> (raw)
Hi,
This patch changes the use of strtok() to strsep().
Strtok() isn't SMP/thread safe. strsep is considered safer.
--
Alex (alex@packetstorm.nu)
-------------------------- cut here -------------------------
diff -uN linux-2.5.3-dj4/fs/vfat/namei.c linux/fs/vfat/namei.c
--- linux-2.5.3-dj4/fs/vfat/namei.c Mon Jan 28 22:20:44 2002
+++ linux/fs/vfat/namei.c Sun Feb 10 03:41:26 2002
@@ -114,7 +114,9 @@
save = 0;
savep = NULL;
ret = 1;
- for (this_char = strtok(options,","); this_char; this_char = strtok(NULL,",")) {
+ while ((this_char = strsep(&options,",")) != NULL) {
+ if (!*this_char)
+ continue;
if ((value = strchr(this_char,'=')) != NULL) {
save = *value;
savep = value;
reply other threads:[~2002-02-10 1:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=IOEMLDKDBECBHMIOCKODEEMCCJAA.alex@packetstorm.nu \
--to=alex@packetstorm.nu \
--cc=chaffee@cs.berkeley.edu \
--cc=davej@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox