summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/malloc.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2018-03-06 14:28:01 +0000
committerderaadt <deraadt@openbsd.org>2018-03-06 14:28:01 +0000
commit1251cd2e235dd594300569cadfd6a14d8ca1e944 (patch)
treec9f79c064a511c618eaf9f8394c2037cb2feafab /lib/libc/stdlib/malloc.c
parentStricter checking for skip1 and skip2. (diff)
downloadwireguard-openbsd-1251cd2e235dd594300569cadfd6a14d8ca1e944.tar.xz
wireguard-openbsd-1251cd2e235dd594300569cadfd6a14d8ca1e944.zip
use _ALIGN() which is uhm a bit OpenBSD-specific, but it means we
don't need to use sys/param.h at all, guess which one i believe is greater namespace polution ok otto
Diffstat (limited to 'lib/libc/stdlib/malloc.c')
-rw-r--r--lib/libc/stdlib/malloc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
index 9843cab838e..90c49aa5389 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malloc.c,v 1.246 2018/03/05 01:32:32 deraadt Exp $ */
+/* $OpenBSD: malloc.c,v 1.247 2018/03/06 14:28:01 deraadt Exp $ */
/*
* Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net>
* Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
@@ -26,7 +26,6 @@
/* #define MALLOC_STATS */
#include <sys/types.h>
-#include <sys/param.h> /* PAGE_SHIFT ALIGN */
#include <sys/queue.h>
#include <sys/mman.h>
#include <sys/uio.h>
@@ -833,7 +832,7 @@ alloc_chunk_info(struct dir_info *d, int bits)
size = sizeof(struct chunk_info) + (size - 1) * sizeof(u_short);
if (mopts.chunk_canaries)
size += count * sizeof(u_short);
- size = ALIGN(size);
+ size = _ALIGN(size);
q = MMAP(MALLOC_PAGESIZE);
if (q == MAP_FAILED)