]> sourceware.org Git - newlib-cygwin.git/commit
libc/stdlib: Use __builtin_mul_overflow for reallocarray and calloc
authorKeith Packard via Newlib <newlib@sourceware.org>
Tue, 11 Aug 2020 23:05:40 +0000 (16:05 -0700)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 12 Aug 2020 08:09:56 +0000 (10:09 +0200)
commit588a5e1ddebdf6d74391c7409680ea20e050c0e1
tree0120470f1d03b05b212e8813a9500fbe44d3f688
parentbafd65f2fb334b40f60de71cd4ba089ead30720f
libc/stdlib: Use __builtin_mul_overflow for reallocarray and calloc

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>
newlib/libc/stdlib/mallocr.c
newlib/libc/stdlib/nano-mallocr.c
newlib/libc/stdlib/reallocarray.c
This page took 0.029417 seconds and 5 git commands to generate.