Thread (158 messages) 158 messages, 3 authors, 2025-10-16

Re: [PATCH 21/49] builtin/repack.c: factor our "generated_pack_install"

From: Patrick Steinhardt <hidden>
Date: 2025-10-08 04:28:31

On Tue, Oct 07, 2025 at 04:26:26PM -0400, Taylor Blau wrote:
On Tue, Sep 30, 2025 at 01:21:46AM +0200, Patrick Steinhardt wrote:
quoted
On Sun, Sep 28, 2025 at 06:08:31PM -0400, Taylor Blau wrote:
quoted
+	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.
I think it's common practice to not have such an explicit cast in our
code base. But in any case, I don't feel strongly about this.

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help