[PATCH 1/3] posix: Remove dynamic memory allocation from execl{e,p}

Mike Frysinger vapier@gentoo.org
Sat Feb 20 08:26:00 GMT 2016


On 19 Feb 2016 16:05, Adhemerval Zanella wrote:
>  int
>  execl (const char *path, const char *arg, ...)
>  {
> ...
> +  char *argv[argc+1];

style nit: needs spaces around the +.  comes up in this patch more than once.

> +  argv[0] = (char*) arg;

space before the *

>  int
>  execle (const char *path, const char *arg, ...)
>  {
> ...
> +  va_start (ap, arg);
> +  argv[0] = (char*) arg;
> +  for (i = 1; i < argc; i++)
> +     argv[i] = va_arg (ap, char *);
> +  envp = va_arg (ap, char **);

is argv missing a NULL terminator ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160220/b25db3b9/attachment.sig>


More information about the Libc-alpha mailing list