Commit 19e66287 authored by Dave Jones's avatar Dave Jones

[PATCH] strtok->strsep in usb

parent 8733b4a3
...@@ -64,9 +64,9 @@ static int parse_options(struct super_block *s, char *data) ...@@ -64,9 +64,9 @@ static int parse_options(struct super_block *s, char *data)
{ {
char *curopt = NULL, *value; char *curopt = NULL, *value;
if (data) while ((curopt = strsep(&data, ",")) != NULL) {
curopt = strtok(data, ","); if (!*curopt)
for (; curopt; curopt = strtok(NULL, ",")) { continue;
if ((value = strchr(curopt, '=')) != NULL) if ((value = strchr(curopt, '=')) != NULL)
*value++ = 0; *value++ = 0;
if (!strcmp(curopt, "devuid")) { if (!strcmp(curopt, "devuid")) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment