]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] strtok->strsep in jfs
authorDave Jones <davej@suse.de>
Wed, 3 Apr 2002 03:57:27 +0000 (19:57 -0800)
committerDave Jones <davej@suse.de>
Wed, 3 Apr 2002 03:57:27 +0000 (19:57 -0800)
fs/jfs/super.c

index f571e4b905cae7b8b10203cdfacb7d52a6711d00..dec4af2fac465148b888c048b14e80e68bed0a1c 100644 (file)
@@ -171,9 +171,9 @@ static int parse_options (char * options, struct jfs_sb_info *sbi)
 
        if (!options)
                return 1;
-       for (this_char = strtok (options, ",");
-            this_char != NULL;
-            this_char = strtok (NULL, ",")) {
+       while ((this_char = strsep (&options, ",")) != NULL) {
+               if (!*this_char)
+                       continue;
                if ((value = strchr (this_char, '=')) != NULL)
                        *value++ = 0;
                if (!strcmp (this_char, "iocharset")) {