summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-19 20:12:46 +0000
committerpfg <pfg@FreeBSD.org>2016-04-19 20:12:46 +0000
commit1b24ba8d1f70c4121baa1cbdd2bd34ef13b80534 (patch)
treeb3fb217981f036e19b97fb575916bb592ad2a01b /libexec/rtld-elf
parent5c1c83ba38c67d797734d182efc33de16f5b36af (diff)
downloadFreeBSD-src-1b24ba8d1f70c4121baa1cbdd2bd34ef13b80534.zip
FreeBSD-src-1b24ba8d1f70c4121baa1cbdd2bd34ef13b80534.tar.gz
rtld-elf: use our roundup2() macro when param.h is available.
Diffstat (limited to 'libexec/rtld-elf')
-rw-r--r--libexec/rtld-elf/malloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/rtld-elf/malloc.c b/libexec/rtld-elf/malloc.c
index f134049..0b3850b 100644
--- a/libexec/rtld-elf/malloc.c
+++ b/libexec/rtld-elf/malloc.c
@@ -224,7 +224,7 @@ malloc(nbytes)
* Record allocated size of block and
* bound space with magic numbers.
*/
- op->ov_size = (nbytes + RSLOP - 1) & ~(RSLOP - 1);
+ op->ov_size = roundup2(nbytes, RSLOP);
op->ov_rmagic = RMAGIC;
*(u_short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
#endif
@@ -388,7 +388,7 @@ realloc(cp, nbytes)
}
if (nbytes <= onb && nbytes > (size_t)i) {
#ifdef RCHECK
- op->ov_size = (nbytes + RSLOP - 1) & ~(RSLOP - 1);
+ op->ov_size = roundup2(nbytes, RSLOP);
*(u_short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
#endif
return(cp);
OpenPOWER on IntegriCloud