Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
[sfrench/cifs-2.6.git] / lib / argv_split.c
index fad6ce4f7b57e353bf9b4a9d8c2dca502b4d5938..4b1b083f219cd68fd0424ff6e4c6c84f6d685d25 100644 (file)
@@ -4,15 +4,9 @@
 
 #include <linux/kernel.h>
 #include <linux/ctype.h>
-#include <linux/bug.h>
-
-static const char *skip_sep(const char *cp)
-{
-       while (*cp && isspace(*cp))
-               cp++;
-
-       return cp;
-}
+#include <linux/string.h>
+#include <linux/slab.h>
+#include <linux/module.h>
 
 static const char *skip_arg(const char *cp)
 {
@@ -27,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);
@@ -81,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;