Jeff King writes:
> However, is there a reason not to use:
>
> sizeof(*sb->lineno)
>
> rather than
>
> sizeof(int)
>
> to avoid type-mismatch errors entirely (this applies both to this patch,
> and to any proposed rewrites using malloc).
It deviates from the style of the original code by tri
On Sat, Feb 08, 2014 at 10:49:40AM +0100, David Kastrup wrote:
> But please note that since sb->lineno originally comes from a zeroed
> memory area and is passed to xrealloc, this requires that after
>
> int *p;
> memset(&p, 0, sizeof(p));
>
> the equivalence
>
> ((void *)p == NULL)
>
> will h
David Kastrup writes:
> If we are calling xrealloc on every single line, the least we can do
> is get the right allocation size.
>
> Signed-off-by: David Kastrup
> ---
> This should be less contentious than the patch in
> http://permalink.gmane.org/gmane.comp.version-control.git/241561>,
> Messa
If we are calling xrealloc on every single line, the least we can do
is get the right allocation size.
Signed-off-by: David Kastrup
---
This should be less contentious than the patch in
http://permalink.gmane.org/gmane.comp.version-control.git/241561>,
Message-ID: <1391550392-17118-1-git-send-ema
4 matches
Mail list logo