diff options
| author | David E. O'Brien <obrien@FreeBSD.org> | 2003-05-04 00:56:00 +0000 |
|---|---|---|
| committer | David E. O'Brien <obrien@FreeBSD.org> | 2003-05-04 00:56:00 +0000 |
| commit | 78af18bd240456a39d887f53917920abe63237d6 (patch) | |
| tree | 5b9b023080432ede3e9df64830aa17a49633aaba /libexec/rtld-elf/malloc.c | |
| parent | 8f5f415d441cf8f717a86d38e380b23471ed86a8 (diff) | |
Notes
Diffstat (limited to 'libexec/rtld-elf/malloc.c')
| -rw-r--r-- | libexec/rtld-elf/malloc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/rtld-elf/malloc.c b/libexec/rtld-elf/malloc.c index 974eb992d2ba..c93531e7d66d 100644 --- a/libexec/rtld-elf/malloc.c +++ b/libexec/rtld-elf/malloc.c @@ -178,7 +178,7 @@ malloc(nbytes) } bucket = 0; amt = 8; - while (pagesz > amt) { + while ((unsigned)pagesz > amt) { amt <<= 1; bucket++; } @@ -189,7 +189,7 @@ malloc(nbytes) * stored in hash buckets which satisfies request. * Account for space used per block for accounting. */ - if (nbytes <= (n = pagesz - sizeof (*op) - RSLOP)) { + if (nbytes <= (unsigned long)(n = pagesz - sizeof (*op) - RSLOP)) { #ifndef RCHECK amt = 8; /* size of first bucket */ bucket = 0; @@ -362,7 +362,7 @@ realloc(cp, nbytes) i = NBUCKETS; } onb = 1 << (i + 3); - if (onb < pagesz) + if (onb < (u_int)pagesz) onb -= sizeof (*op) + RSLOP; else onb += pagesz - sizeof (*op) - RSLOP; @@ -375,7 +375,7 @@ realloc(cp, nbytes) else i += pagesz - sizeof (*op) - RSLOP; } - if (nbytes <= onb && nbytes > i) { + if (nbytes <= onb && nbytes > (size_t)i) { #ifdef RCHECK op->ov_size = (nbytes + RSLOP - 1) & ~(RSLOP - 1); *(u_short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC; |
