X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=lib%2Fargv_split.c;h=5205a8dae5bc08c51a4f0f283dd812e2fab25a04;hb=73dc532bc1eebe3bff6b918c5685a219eae27f97;hp=4096ed42f490869c252b1e33ea76050fe8f1ec92;hpb=939ab20152390c8ccccfa6fac0830405ca91d903;p=linux-2.6-block.git diff --git a/lib/argv_split.c b/lib/argv_split.c index 4096ed42f490..5205a8dae5bc 100644 --- a/lib/argv_split.c +++ b/lib/argv_split.c @@ -4,7 +4,8 @@ #include #include -#include +#include +#include static const char *skip_sep(const char *cp) { @@ -75,7 +76,9 @@ char **argv_split(gfp_t gfp, const char *str, int *argcp) if (argv == NULL) goto out; - *argcp = argc; + if (argcp) + *argcp = argc; + argvp = argv; while (*str) {