On Wed, Jun 5, 2024 at 11:14 AM Nathan Bossart <nathandboss...@gmail.com> wrote:
> In fact, many of the functions in this area don't actually need to return anything, so we can trim some code and hopefully reduce confusion a > bit. Patch attached. > Nice cleanup! Two minor comments: (1) Names like `getXXX` for these functions suggest to me that they return a value, rather than side-effecting. I realize some variants continue to return a value, but the majority no longer do. Perhaps a name like lookupXXX() or readXXX() would be clearer? (2) These functions malloc() a single ntups * sizeof(struct) allocation and then index into it to fill-in each struct before entering it into the hash table. It might be more straightforward to just malloc each individual struct. Neil