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

index 329462ed7ee595b98ac7423dfcf0b6150e320116..73527b766d81d3c071972ac367efb8827483f0ae 100644 (file)
@@ -64,9 +64,9 @@ static int parse_options(struct super_block *s, char *data)
 {
        char *curopt = NULL, *value;
 
-       if (data)
-               curopt = strtok(data, ",");
-       for (; curopt; curopt = strtok(NULL, ",")) {
+       while ((curopt = strsep(&data, ",")) != NULL) {
+               if (!*curopt)
+                       continue;
                if ((value = strchr(curopt, '=')) != NULL)
                        *value++ = 0;
                if (!strcmp(curopt, "devuid")) {