Re: [PATCH v2 2/9] reftable: introduce macros to allocate arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux