From: Derrick Stolee Date: Wed, 25 Sep 2019 12:48:08 GMT Subject: Re: [PATCH v2 04/19] hashmap_entry_init takes "struct hashmap_entry *" Message-ID: In-Reply-To: <20190924010324.22619-5-e@80x24.org> On 9/23/2019 9:03 PM, Eric Wong wrote: > C compilers do type checking to make life easier for us. So > rely on that and update all hashmap_entry_init callers to take > "struct hashmap_entry *" to avoid future bugs while improving > safety and readability. [snip] > @@ -244,9 +244,9 @@ void hashmap_free(struct hashmap *map, int free_entries); > * your structure was allocated with xmalloc(), you can just free(3) it, > * and if it is on stack, you can just let it go out of scope). > */ > -static inline void hashmap_entry_init(void *entry, unsigned int hash) > +static inline void > +hashmap_entry_init(struct hashmap_entry *e, unsigned int hash) > { I think the preferred line break here would be something like: static inline void hashmap_entry_init(struct hashmap_entry *e, unsigned int hash) The rest of this patch is very mechanical and easy to check for correctness. Thanks, -Stolee