svn commit: r298292 - head/libexec/rtld-elf
Pedro F. Giffuni
pfg at FreeBSD.org
Tue Apr 19 20:12:47 UTC 2016
Author: pfg
Date: Tue Apr 19 20:12:46 2016
New Revision: 298292
URL: https://svnweb.freebsd.org/changeset/base/298292
Log:
rtld-elf: use our roundup2() macro when param.h is available.
Modified:
head/libexec/rtld-elf/malloc.c
Modified: head/libexec/rtld-elf/malloc.c
==============================================================================
--- head/libexec/rtld-elf/malloc.c Tue Apr 19 19:22:07 2016 (r298291)
+++ head/libexec/rtld-elf/malloc.c Tue Apr 19 20:12:46 2016 (r298292)
@@ -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);
More information about the svn-src-all
mailing list