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

Re: [PATCH v2] promisor-remote: fix xcalloc() argument order

From
Jeff King <peff@peff.net>
Date
Aug 24, 2022, 08:32 UTC
Message-ID
<YwXiKXONiTt+fIdi@coredump.intra.peff.net>
In-Reply-To
<20220823095733.58685-1-szeder.dev@gmail.com>
On Tue, Aug 23, 2022 at 11:57:33AM +0200, SZEDER Gábor wrote:
Show 6 quoted lines
> Pass the number of elements first and their size second, as expected
> by xcalloc().
> 
> Patch generated with:
> 
>   make SPATCH_FLAGS=--recursive-includes contrib/coccinelle/xcalloc.cocci.patch

Thanks for digging here. I think it probably explains a lot of "wait, why did this result change" head-scratching I did back when we started batching a few years ago.

Is there any reason we wouldn't want --recursive-includes to be added to the default SPATCH_FLAGS?

I suspect we'd still want to leave --all-includes there to get as much type information as possible. If I understand correctly, the two are orthogonal (one is "follow includes of includes" and the other is "follow system includes in angle brackets").

Doing so doesn't seem to find any other missed entries in the current codebase, but I'm pretty sure there are some it would have caught in a less mysterious fashion over the years.

-Peff
Previous: SZEDER GáborNext: SZEDER Gábor
Message 8 of 14 in “promisor-remote: fix xcalloc() argument order”
  1. promisor-remote: fix xcalloc() argument orderSZEDER Gábor, Aug 22, 2022
  2. Junio C HamanoAug 22, 2022
  3. Junio C HamanoAug 23, 2022
  4. SZEDER GáborAug 23, 2022
  5. SZEDER GáborAug 23, 2022
  6. SZEDER GáborAug 23, 2022
  7. promisor-remote: fix xcalloc() argument orderSZEDER Gábor, Aug 23, 2022
  8. Jeff KingAug 24, 2022
  9. SZEDER GáborAug 24, 2022
  10. Jeff KingAug 25, 2022
  11. Ævar Arnfjörð BjarmasonAug 25, 2022
  12. Junio C HamanoAug 24, 2022
  13. SZEDER GáborAug 24, 2022
  14. Junio C HamanoAug 24, 2022

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.