summaryrefslogtreecommitdiff
path: root/openbsd-compat/reallocarray.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/reallocarray.c')
-rw-r--r--openbsd-compat/reallocarray.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsd-compat/reallocarray.c b/openbsd-compat/reallocarray.c
index 68f406446..cffe9b5ef 100644
--- a/openbsd-compat/reallocarray.c
+++ b/openbsd-compat/reallocarray.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: reallocarray.c,v 1.1 2014/05/08 21:43:49 deraadt Exp $ */ 1/* $OpenBSD: reallocarray.c,v 1.2 2014/12/08 03:45:00 bcook Exp $ */
2/* 2/*
3 * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net> 3 * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
4 * 4 *
@@ -29,7 +29,7 @@
29 * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX 29 * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX
30 * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW 30 * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW
31 */ 31 */
32#define MUL_NO_OVERFLOW (1UL << (sizeof(size_t) * 4)) 32#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4))
33 33
34void * 34void *
35reallocarray(void *optr, size_t nmemb, size_t size) 35reallocarray(void *optr, size_t nmemb, size_t size)