Commit 711263df authored by Dave Jones's avatar Dave Jones

[PATCH] strtok->strsep in shmem

parent 59e7e2d5
...@@ -1203,10 +1203,9 @@ static int shmem_parse_options(char *options, int *mode, uid_t *uid, gid_t *gid, ...@@ -1203,10 +1203,9 @@ static int shmem_parse_options(char *options, int *mode, uid_t *uid, gid_t *gid,
{ {
char *this_char, *value, *rest; char *this_char, *value, *rest;
this_char = NULL; while ((this_char = strsep(&options, ",")) != NULL) {
if ( options ) if (!*this_char)
this_char = strtok(options,","); continue;
for ( ; this_char; this_char = strtok(NULL,",")) {
if ((value = strchr(this_char,'=')) != NULL) { if ((value = strchr(this_char,'=')) != NULL) {
*value++ = 0; *value++ = 0;
} else { } else {
......
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