diff options
author | obrien <obrien@FreeBSD.org> | 2003-05-04 00:56:00 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2003-05-04 00:56:00 +0000 |
commit | 43ecc39077d55a2ece31e75c8e80612a8b840785 (patch) | |
tree | 5b9b023080432ede3e9df64830aa17a49633aaba /libexec/rtld-elf/malloc.c | |
parent | bef29d279be2b25e16fa173fb9f5f5117075524e (diff) | |
download | FreeBSD-src-43ecc39077d55a2ece31e75c8e80612a8b840785.zip FreeBSD-src-43ecc39077d55a2ece31e75c8e80612a8b840785.tar.gz |
Fix signed/unsigned comparison warnings.
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 974eb99..c93531e 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; |