]> git.hungrycats.org Git - linux/commitdiff
[PATCH] strtok->strsep in affs
authorDave Jones <davej@suse.de>
Wed, 3 Apr 2002 03:58:19 +0000 (19:58 -0800)
committerDave Jones <davej@suse.de>
Wed, 3 Apr 2002 03:58:19 +0000 (19:58 -0800)
fs/affs/super.c

index adfefd10ff905d999e450179424207dbc1c046d0..2a7e4c9a7c87f6e7bd2d4737c4026bfb916e89a4 100644 (file)
@@ -161,7 +161,9 @@ parse_options(char *options, uid_t *uid, gid_t *gid, int *mode, int *reserved, s
        *mount_opts = 0;
        if (!options)
                return 1;
-       for (this_char = strtok(options,","); this_char; this_char = strtok(NULL,",")) {
+       while ((this_char = strsep(&options, ",")) != NULL) {
+               if (!*this_char)
+                       continue;
                f = 0;
                if ((value = strchr(this_char,'=')) != NULL)
                        *value++ = 0;
@@ -291,7 +293,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
 
        sb->s_magic             = AFFS_SUPER_MAGIC;
        sb->s_op                = &affs_sops;
-       
+
        sbi = kmalloc(sizeof(struct affs_sb_info), GFP_KERNEL);
        if (!sbi)
                return -ENOMEM;