[PATCH v6 2/3] support: Add xreallocarray

Florian Weimer fweimer@redhat.com
Fri Mar 10 16:49:28 GMT 2023


* 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.

Thanks,
Florian



More information about the Libc-alpha mailing list