Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

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

 



My apologies! I based my work off of maint, branching off of eea591.

My reasoning was that Documentation/SubmittingPatches states that "a
bugfix should be based on 'maint'". [1] Now that I think about it,
this is probably not the kind of "bug" that statement had in mind.

Should I reroll the patch based on master?

- Brian Gesiak

[1] https://github.com/git/git/blob/4a28f169ad29ba452e0e7bea2583914c10c58322/Documentation/SubmittingPatches#L9

On Tue, May 27, 2014 at 8:11 AM, Jeremiah Mahler <jmmahler@xxxxxxxxx> wrote:
> Brian,
>
> On Tue, May 27, 2014 at 12:33:42AM +0900, Brian Gesiak 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.
>>
>> Signed-off-by: Brian Gesiak <modocache@xxxxxxxxx>
>> ---
>>  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)
>>
>
> This patch doesn't apply to any of the branches I have available
> (master, pu, next).  And there is no line containing "pathspec->nr + 6"
> anywhere in my builtin/add.c.  Which branch is your work based off?
>
> --
> Jeremiah Mahler
> jmmahler@xxxxxxxxx
> http://github.com/jmahler
--
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]