diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/stdlib/reallocarray.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/reallocarray.c b/src/lib/libc/stdlib/reallocarray.c index 7accd99e00..ed3244e22f 100644 --- a/src/lib/libc/stdlib/reallocarray.c +++ b/src/lib/libc/stdlib/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 | * |
| @@ -24,7 +24,7 @@ | |||
| 24 | * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX | 24 | * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX |
| 25 | * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW | 25 | * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW |
| 26 | */ | 26 | */ |
| 27 | #define MUL_NO_OVERFLOW (1UL << (sizeof(size_t) * 4)) | 27 | #define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) |
| 28 | 28 | ||
| 29 | void * | 29 | void * |
| 30 | reallocarray(void *optr, size_t nmemb, size_t size) | 30 | reallocarray(void *optr, size_t nmemb, size_t size) |
