From 7fafa37e2a2a60b497715fdff9a6891f0d2f9333 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Sat, 30 Apr 2011 15:46:47 +0000 Subject: Now that we use an array of u_short for the chunk bitmap change a few 1UL to 1U. --- lib/libc/stdlib/malloc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/libc') 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 * @@ -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) -- cgit v1.2.3