[PATCH v6 2/3] support: Add xreallocarray

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Fri Mar 10 18:44:54 GMT 2023



On 10/03/23 13:49, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> +void *
>> +xreallocarray (void *p, size_t n, size_t s)
>> +{
>> +  void *r = reallocarray (p, n, s);
>> +  if (r == NULL)
>> +    oom_error ("reallocarray", n);
>> +  return r;
>> +}
> 
> Isn't the failure condition more complicated?  See xrealloc.

Indeed, I will update the patch.


More information about the Libc-alpha mailing list