diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2011-04-30 15:46:47 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2011-04-30 15:46:47 +0000 |
commit | 7fafa37e2a2a60b497715fdff9a6891f0d2f9333 (patch) | |
tree | c83226fb29b37012d8d6b5d8a2261b376bf57937 /lib/libc | |
parent | 450547a00432c8ceda70e72936f477d9ed669a52 (diff) |
Now that we use an array of u_short for the chunk bitmap change a few
1UL to 1U.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdlib/malloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 010cb7fafcd..84ca2be7183 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.128 2011/04/30 14:56:20 otto Exp $ */ +/* $OpenBSD: malloc.c,v 1.129 2011/04/30 15:46:46 otto Exp $ */ /* * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net> * @@ -946,7 +946,7 @@ omalloc_make_chunks(struct dir_info *d, int bits) return NULL; } } else { - bp->size = (1UL << bits); + bp->size = 1U << bits; bp->shift = bits; bp->total = bp->free = MALLOC_PAGESIZE >> bits; bp->page = pp; @@ -1081,16 +1081,16 @@ free_bytes(struct dir_info *d, struct region_info *r, void *ptr) /* Find the chunk number on the page */ i = ((uintptr_t)ptr & MALLOC_PAGEMASK) >> info->shift; - if ((uintptr_t)ptr & ((1UL << (info->shift)) - 1)) { + if ((uintptr_t)ptr & ((1U << (info->shift)) - 1)) { wrterror("modified chunk-pointer", ptr); return; } - if (info->bits[i / MALLOC_BITS] & (1UL << (i % MALLOC_BITS))) { + if (info->bits[i / MALLOC_BITS] & (1U << (i % MALLOC_BITS))) { wrterror("chunk is already free", ptr); return; } - info->bits[i / MALLOC_BITS] |= 1UL << (i % MALLOC_BITS); + info->bits[i / MALLOC_BITS] |= 1U << (i % MALLOC_BITS); info->free++; if (info->size != 0) |