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

index 9bcc2335caab38310e6a77836481f437316a66a3..fbc6bf66eda9cf3e99f8b3201d58897b57aaa3a7 100644 (file)
@@ -360,10 +360,13 @@ static int parse_options(ntfs_volume *vol, char *opt)
        int use_utf8 = -1;      /* If no NLS specified and loading the default
                                   NLS failed use utf8. */
        int mft_zone_mul = -1;  /* 1 */
+       char *opts = opt;
 
        if (!opt)
                goto done;
-       for (opt = strtok(opt, ","); opt; opt = strtok(NULL, ",")) {
+       while ((opt = strsep(&opts, ",")) != NULL) {
+               if (!*opt)
+                       continue;
                if ((value = strchr(opt, '=')) != NULL)
                        *value ++= '\0';
                if (strcmp(opt, "uid") == 0) {