public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: l.s.r@web.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] strtok -> strsep (The Easy Cases)
Date: Sat, 05 May 2001 00:30:05 +1000	[thread overview]
Message-ID: <m14vgas-001QLrC@mozart> (raw)
In-Reply-To: Your message of "Fri, 04 May 2001 13:07:56 +0200." <01050413055100.00907@golmepha>

In message <01050413055100.00907@golmepha> you write:
> Am Freitag,  4. Mai 2001 02:57 schrieb Rusty Russell:
> > There are two cases where the substitution is problematic:
> 
> Yes, but...
> 
> The cases which my patch modifies are of a different kind:

The very first hunk of your patch is wrong.  I didn't check the
others.  Note that the declaration of switches is:

    char switches[len+1];

--- linux-2.4.4/arch/m68k/atari/config.c	Tue Nov 28 02:57:34 2000
+++ linux-2.4.4-rs/arch/m68k/atari/config.c	Tue May  1 17:03:46 2001
@@ -206,13 +206,15 @@
 
     /* parse the options */
-    for( p = strtok( switches, "," ); p; p = strtok( NULL, "," ) ) {
+    while( p = strsep( &switches, "," ) ) {
+	if (!*p)
+		continue;
 	ovsc_shift = 0;
 	if (strncmp( p, "ov_", 3 ) == 0) {
 	    p += 3;

Cheers,
Rusty.
--
Premature optmztion is rt of all evl. --DK

  reply	other threads:[~2001-05-04 14:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-01 18:58 [PATCH] strtok -> strsep (The Easy Cases) Rene Scharfe
2001-05-04  0:57 ` Rusty Russell
2001-05-04 11:07   ` Rene Scharfe
2001-05-04 14:30     ` Rusty Russell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-05-04 21:17  René Scharfe 

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=m14vgas-001QLrC@mozart \
    --to=rusty@rustcorp.com.au \
    --cc=l.s.r@web.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