aboutsummaryrefslogtreecommitdiff
path: root/malloc/alloc_buffer_alloc_array.c
diff options
context:
space:
mode:
Diffstat (limited to 'malloc/alloc_buffer_alloc_array.c')
-rw-r--r--malloc/alloc_buffer_alloc_array.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/malloc/alloc_buffer_alloc_array.c b/malloc/alloc_buffer_alloc_array.c
index 1dd098a8fc..7505422b43 100644
--- a/malloc/alloc_buffer_alloc_array.c
+++ b/malloc/alloc_buffer_alloc_array.c
@@ -17,7 +17,6 @@
<http://www.gnu.org/licenses/>. */
#include <alloc_buffer.h>
-#include <malloc-internal.h>
#include <libc-pointer-arith.h>
void *
@@ -28,7 +27,7 @@ __libc_alloc_buffer_alloc_array (struct alloc_buffer *buf, size_t element_size,
/* The caller asserts that align is a power of two. */
size_t aligned = ALIGN_UP (current, align);
size_t size;
- bool overflow = check_mul_overflow_size_t (element_size, count, &size);
+ bool overflow = __builtin_mul_overflow (element_size, count, &size);
size_t new_current = aligned + size;
if (!overflow /* Multiplication did not overflow. */
&& aligned >= current /* No overflow in align step. */