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

Re: [PATCH] object-file: use `container_of()` to convert from base types

From
Toon Claes <toon@iotcl.com>
Date
Feb 20, 2026, 16:07 UTC
Message-ID
<87zf53e6uh.fsf@iotcl.com>
In-Reply-To
<20260218210120.1146078-1-jltobler@gmail.com>
Justin Tobler <jltobler@gmail.com> writes:
Show 16 quoted lines
> To improve code hygiene, replace direct casts from `struct
> odb_transaction` and `struct odb_read_stream` to their concrete
> implementations with `container_of()`.
>
> Signed-off-by: Justin Tobler <jltobler@gmail.com>
> ---
>
> Greeting,
>
> This patch is a small cleanup following discussion in [1].
>
> Thanks,
> -Justin
>
> [1]: <87o6m5rff8.fsf@iotcl.com>
>
Thanks for following up on this.
-- 
Cheers,
Toon
Previous: Patrick SteinhardtNext: Junio C Hamano
Message 3 of 8 in “object-file: use `container_of()` to convert from base types”
  1. object-file: use `container_of()` to convert from base typesJustin Tobler, Feb 18, 2026
  2. Patrick SteinhardtFeb 19, 2026
  3. Toon ClaesFeb 20, 2026
  4. Junio C HamanoFeb 22, 2026
  5. Jeff KingFeb 22, 2026
  6. Justin ToblerFeb 22, 2026
  7. Junio C HamanoFeb 22, 2026
  8. object-file.c: avoid container_of() of a NULL containerJunio C Hamano, Feb 22, 2026

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.