git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] builtin/blame.c::prepare_lines: fix allocation size of sb->lineno

From
David Kastrup <dak@gnu.org>
Date
Feb 8, 2014, 21:34 UTC
Message-ID
<87ha89b85p.fsf@fencepost.gnu.org>
In-Reply-To
<20140208212154.GA4283@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> 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 tried and true Git developers. So feel free to roll your own patch here: it's not like this one has any copyrightable content in it.

-- 
David Kastrup
Previous: Jeff King
Message 4 of 4 in “builtin/blame.c::prepare_lines: fix allocation size of sb->lineno”
  1. builtin/blame.c::prepare_lines: fix allocation size of sb->linenoDavid Kastrup, Feb 8, 2014
  2. David KastrupFeb 8, 2014
  3. Jeff KingFeb 8, 2014
  4. David KastrupFeb 8, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.