diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 08:55:20 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 08:55:20 +0100 |
commit | 35858adbfca13678af99fb31618ef4428d6dedb0 (patch) | |
tree | 3336feaa61324486945816cb52c347733e7c0821 /lib/argv_split.c | |
parent | Input: winbond-cir - fix suspend/resume (diff) | |
parent | Input: atkbd - release previously reserved keycodes 248 - 254 (diff) | |
download | linux-35858adbfca13678af99fb31618ef4428d6dedb0.tar.xz linux-35858adbfca13678af99fb31618ef4428d6dedb0.zip |
Merge branch 'next' into for-linus
Diffstat (limited to 'lib/argv_split.c')
-rw-r--r-- | lib/argv_split.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/argv_split.c b/lib/argv_split.c index 5205a8dae5bc..4b1b083f219c 100644 --- a/lib/argv_split.c +++ b/lib/argv_split.c @@ -4,17 +4,10 @@ #include <linux/kernel.h> #include <linux/ctype.h> +#include <linux/string.h> #include <linux/slab.h> #include <linux/module.h> -static const char *skip_sep(const char *cp) -{ - while (*cp && isspace(*cp)) - cp++; - - return cp; -} - static const char *skip_arg(const char *cp) { while (*cp && !isspace(*cp)) @@ -28,7 +21,7 @@ static int count_argc(const char *str) int count = 0; while (*str) { - str = skip_sep(str); + str = skip_spaces(str); if (*str) { count++; str = skip_arg(str); @@ -82,7 +75,7 @@ char **argv_split(gfp_t gfp, const char *str, int *argcp) argvp = argv; while (*str) { - str = skip_sep(str); + str = skip_spaces(str); if (*str) { const char *p = str; |