aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdlib/reallocarray.c
AgeCommit message (Collapse)AuthorFilesLines
2020-08-12libc/stdlib: Use __builtin_mul_overflow for reallocarray and callocKeith Packard via Newlib1-12/+5
This built-in function (available in both gcc and clang) is more efficient and generates shorter code than open-coding the test. Signed-off-by: Keith Packard <keithp@keithp.com>
2017-04-04Add BSD-specific reallocarray()Sebastian Huber1-0/+42
It is available in FreeBSD, NetBSD and OpenBSD, but not in glibc. It is used for example by OpenSSH.