diff options
Diffstat (limited to 'usbredirparser')
-rw-r--r-- | usbredirparser/strtok_r.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usbredirparser/strtok_r.c b/usbredirparser/strtok_r.c index 227d1ea..7802962 100644 --- a/usbredirparser/strtok_r.c +++ b/usbredirparser/strtok_r.c @@ -51,10 +51,10 @@ glibc_strtok_r (char *s, const char *delim, char **save_ptr) /* Find the end of the token. */ token = s; - s = strpbrk (token, delim); - if (s == NULL) + s += strcspn (token, delim); + if (*s == '\0') /* This token finishes the string. */ - *save_ptr = strchr (token, '\0'); + *save_ptr = s; else { /* Terminate the token and make *SAVE_PTR point past it. */ |