On 8/2/17, [email protected] <[email protected]> wrote:
> commit 37e44c95655e252aa7763671f53524dceaf8a65b
> Author:     Laslo Hunhold <[email protected]>
> AuthorDate: Wed Aug 2 08:36:28 2017 +0200
> Commit:     Laslo Hunhold <[email protected]>
> CommitDate: Wed Aug 2 08:36:28 2017 +0200
>
>     Minor style change in arg.h
>
>     We decrement argc first before incrementing argv, so we never have a
>     state where we potentially point to uncharted territory.
>
> diff --git a/arg.h b/arg.h
> index 77cf5be..003f8ec 100644
> --- a/arg.h
> +++ b/arg.h
> @@ -22,7 +22,7 @@
>  extern char *argv0;
>
>  /* int main(int argc, char *argv[]) */
> -#define ARGBEGIN for (argv0 = *argv, argv++, argc--;
>       \
> +#define ARGBEGIN for (argv0 = *argv, argc--, argv++;
>       \
>                        *argv && (*argv)[0] == '-' && (*argv)[1]; argc--,
> argv++) { \
>                       int argparsed;
> \
>                       if ((*argv)[1] == '-' && (*argv)[2] == '\0') {
> \
>
>


execve("/my/fine/program", NULL, NULL);

char *empty[] = { NULL };
execve("/my/fine/program", empty, empty);

Reply via email to