Re: [PATCH 21/49] builtin/repack.c: factor our "generated_pack_install"
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Oct 7, 2025, 20:26 UTC
- Message-ID
- <aOV3cuZhab7xOdez@nand.local>
- In-Reply-To
- <aNsUiho56-S4MQZg@pks.im>
On Tue, Sep 30, 2025 at 01:21:46AM +0200, Patrick Steinhardt wrote:
> On Sun, Sep 28, 2025 at 06:08:31PM -0400, Taylor Blau wrote: > > Is the "factor our" in the commit subject supposed to read "factor out"?
Oops, good catch ;-).
Show 5 quoted lines
> > + for_each_string_list_item(item, &names) > > + generated_pack_install((struct generated_pack *)item->util, > > This cast should be unnecessary, right? `item->util` is a void pointer, > so C should do the cast implicitly.
It's unnecessary, but I dislike implicit casts from 'void*' to any other type. This makes it clearer how we're supposed to interpret the value in item->util, but I'm happy to change it to use the implicit cast if you feel strongly about it.
Thanks, Taylor