summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/recallocarray.c
AgeCommit message (Collapse)Author
2025-10-03lib/libc: add recallocarray()Robert Clausecker
This function from OpenBSD is a hybrid of reallocarray() and calloc(). It reallocates an array, clearing any newly allocated items. reallocarray() ultimately originates from OpenBSD. The source is taken from lib/libopenbsd, which now no longer has the function unless when bootstrapping (needed for mandoc). Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D52863