Re: [PATCH 1/3] Prepare execv_git_cmd() for removal of builtins from the filesystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le dimanche 2 décembre 2007, Junio C Hamano a écrit :
> +	for (argc = 0; argv[argc]; argc++)
> +		; /* just counting */
> +	nargv = xmalloc(sizeof(*nargv) * (argc + 2));
>
> -	trace_argv_printf(argv, -1, "trace: exec:");
> +	nargv[0] = "git";
> +	for (argc = 0; argv[argc]; argc++)
> +		nargv[argc + 1] = argv[argc];
> +	nargv[argc + 1] = NULL;
> +	trace_argv_printf(nargv, -1, "trace: exec:");

Minor nit: now that the number of arguments is known, we could perhaps use 
the argument count instead of -1 in trace_argv_printf, so that it is not 
computed again in quote.c:sq_quote_argv, like this:

trace_argv_printf(nargv, argc + 1, "trace: exec:");

Christian.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux