David Kastrup d...@gnu.org 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 d...@gnu.org
---
This should be less contentious than the patch in
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 hold. While
Jeff King p...@peff.net 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
3 matches
Mail list logo