Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 27, 2014, 21:35 UTC
- Message-ID
- <CAPig+cTmyBzroDOnqEb_GWqhcbgbK27pT3=3VCVOnj13=C4CfA@mail.gmail.com>
- In-Reply-To
- <CAN7MxmXVDTiQv5J9cU2E8iS=BNROw3q9NVaBuG7aQP-7=Qo_ZQ@mail.gmail.com>
On Tue, May 27, 2014 at 7:32 AM, Brian Gesiak <modocache@gmail.com> wrote:
> Oomph, how embarrassing. Thanks for pointing that out!
Etiquette on this list is to avoid top-posting [1].
[1]: https://lkml.org/lkml/2005/1/11/111
> Would it be better if I rerolled the patches?
Junio may or may not make small fixes himself when he picks up a patch series. If you don't hear from him and your patches don't appear in his 'pu' branch with that fix, re-rolling might be advisable.
Show 8 quoted lines
> - Brian Gesiak > > On Tue, May 27, 2014 at 12:25 PM, Eric Sunshine <sunshine@sunshineco.com> wrote: >> On Mon, May 26, 2014 at 11:33 AM, Brian Gesiak <modocache@gmail.com> wrote: >>> xcalloc takes two arguments: the number of elements and their size. >>> run_add_interactive passes the arguments in reverse order, passing the >>> size of a char*, followed by the number of char* to be allocated. >>> Rearrgange them so they are in the correct order.
If you do re-roll, perhaps consider simplifying the commit messages. The patch itself states concisely and precisely what is being changed; the lengthy prose description doesn't really add anything (and makes more work for you and the reader of the message). It might be sufficient to use a single-line (Subject:) commit message, like this:
builtin/add.c: fix order of xcalloc arguments
Show 24 quoted lines
>> s/Rearrgange/Rearrange/ >> >> Same misspelling afflicts the entire patch series. >> >>> Signed-off-by: Brian Gesiak <modocache@gmail.com> >>> --- >>> builtin/add.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/builtin/add.c b/builtin/add.c >>> index 672adc0..488acf4 100644 >>> --- a/builtin/add.c >>> +++ b/builtin/add.c >>> @@ -248,7 +248,7 @@ int run_add_interactive(const char *revision, const char *patch_mode, >>> int status, ac, i; >>> const char **args; >>> >>> - args = xcalloc(sizeof(const char *), (pathspec->nr + 6)); >>> + args = xcalloc((pathspec->nr + 6), sizeof(const char *)); >>> ac = 0; >>> args[ac++] = "add--interactive"; >>> if (patch_mode) >>> -- >>> 2.0.0.rc1.543.gc8042da