rtld-elf: use our roundup2() macro when param.h is available.
This commit is contained in:
parent
5c1c83ba38
commit
1b24ba8d1f
@ -224,7 +224,7 @@ malloc(nbytes)
|
|||||||
* Record allocated size of block and
|
* Record allocated size of block and
|
||||||
* bound space with magic numbers.
|
* bound space with magic numbers.
|
||||||
*/
|
*/
|
||||||
op->ov_size = (nbytes + RSLOP - 1) & ~(RSLOP - 1);
|
op->ov_size = roundup2(nbytes, RSLOP);
|
||||||
op->ov_rmagic = RMAGIC;
|
op->ov_rmagic = RMAGIC;
|
||||||
*(u_short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
|
*(u_short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
|
||||||
#endif
|
#endif
|
||||||
@ -388,7 +388,7 @@ realloc(cp, nbytes)
|
|||||||
}
|
}
|
||||||
if (nbytes <= onb && nbytes > (size_t)i) {
|
if (nbytes <= onb && nbytes > (size_t)i) {
|
||||||
#ifdef RCHECK
|
#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;
|
*(u_short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
|
||||||
#endif
|
#endif
|
||||||
return(cp);
|
return(cp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user