X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fprocess%2Fexeclp.c;h=c7b3f51389eba341edee086981a068e137f87b3b;hp=33fb0f7f3bf1da083ca8b1f05a22defa31730f24;hb=3cd084bb03aabd303777e866ca30b320194ccbd7;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 diff --git a/src/process/execlp.c b/src/process/execlp.c index 33fb0f7f..c7b3f513 100644 --- a/src/process/execlp.c +++ b/src/process/execlp.c @@ -1,18 +1,19 @@ #include #include -int execlp(const char *file, ...) +int execlp(const char *file, const char *argv0, ...) { int argc; va_list ap; - va_start(ap, file); - for (argc=0; va_arg(ap, const char *); argc++); + va_start(ap, argv0); + for (argc=1; va_arg(ap, const char *); argc++); va_end(ap); { int i; char *argv[argc+1]; - va_start(ap, file); - for (i=0; i