Patrick Steinhardt <ps@xxxxxx> writes: > Similar to the preceding commit, let's carry over macros to allocate > arrays with `REFTABLE_ALLOC_ARRAY()` and `REFTABLE_CALLOC_ARRAY()`. This > requires us to change the signature of `reftable_calloc()`, which only > takes a single argument right now and thus puts the burden on the caller > to calculate the final array's size. This is a net improvement though as > it means that we can now provide proper overflow checks when multiplying > the array size with the member size. > > Convert callsites of `reftable_calloc()` to the new signature, using the > new macros where possible. What about converting users of `reftable_malloc()` to use `REFTABLE_ALLOC_ARRAY()`. This means currently `REFTABLE_ALLOC_ARRAY()` is defined and never used in this patch series.
Attachment:
signature.asc
Description: PGP signature