X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=lib%2Fargv_split.c;h=5205a8dae5bc08c51a4f0f283dd812e2fab25a04;hb=92fb83afd6664a6f8a05f990d264c998f9b99f69;hp=4096ed42f490869c252b1e33ea76050fe8f1ec92;hpb=5e16e3f0e24dadb79b96b6134cd3303f0d42f0c5;p=karo-tx-linux.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) {