On Mon, Feb 15, 2016 at 11:18:56PM -0500, Eric Sunshine wrote:
> > diff --git a/builtin/reflog.c b/builtin/reflog.c
> > @@ -408,13 +407,12 @@ static struct reflog_expire_cfg *find_cfg_ent(const
> > char *pattern, size_t len)
> > reflog_expire_cfg_tail = _expire_cfg;
> >
> >
On Mon, Feb 15, 2016 at 10:36 PM, Jeff King wrote:
> On Mon, Feb 15, 2016 at 10:26:26PM -0500, Jeff King wrote:
>> We could do this on top of my series (I can also factor out the fix
>> separately to go at the beginning if we don't want to hold the bugfix
>> hostage).
>>
>> -- >8
On Mon, Feb 15, 2016 at 10:15 PM, Jeff King wrote:
> On Mon, Feb 15, 2016 at 09:17:05PM -0500, Eric Sunshine wrote:
>> > - ent = xcalloc(1, (sizeof(*ent) + len));
>> > - memcpy(ent->pattern, pattern, len);
>> > + FLEX_ALLOC_MEM(ent, pattern, pattern, len);
>>
>>
On Mon, Feb 15, 2016 at 10:26:26PM -0500, Jeff King wrote:
> We could do this on top of my series (I can also factor out the fix
> separately to go at the beginning if we don't want to hold the bugfix
> hostage).
>
> -- >8 --
> Subject: [PATCH] reflog_expire_cfg: drop misleading "len" parameter
On Mon, Feb 15, 2016 at 10:15:54PM -0500, Jeff King wrote:
> > Answering my own question: Looking at reflog_expire_config() and
> > parse_config_key(), I gather that 'len' already accounts for the NUL,
> > thus the new code is overallocating (which should not be a problem).
>
> Actually, I think
On Mon, Feb 15, 2016 at 09:17:05PM -0500, Eric Sunshine wrote:
> > ---
> > diff --git a/builtin/reflog.c b/builtin/reflog.c
> > @@ -412,8 +410,7 @@ static struct reflog_expire_cfg *find_cfg_ent(const
> > char *pattern, size_t len)
> > !memcmp(ent->pattern, pattern, len))
> >
On Mon, Feb 15, 2016 at 4:52 PM, Jeff King wrote:
> Using FLEX_ARRAY macros reduces the amount of manual
> computation size we have to do. It also ensures we don't
> overflow size_t, and it makes sure we write the same number
> of bytes that we allocated.
>
> Signed-off-by: Jeff
Using FLEX_ARRAY macros reduces the amount of manual
computation size we have to do. It also ensures we don't
overflow size_t, and it makes sure we write the same number
of bytes that we allocated.
Signed-off-by: Jeff King
---
attr.c | 4 +---
builtin/blame.c
8 matches
Mail list logo