diff options
| author | christos <christos@NetBSD.org> | 2004-06-30 13:58:16 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2004-06-30 13:58:16 +0000 |
| commit | 049fd5eb10a8031b83fdabfa3aed7bee92d6168a (patch) | |
| tree | 81e784550afe4c847bd5057b9de2331a74296ab2 /sys/lib/libsa/alloc.c | |
| parent | c7f7436fef0a91dde14d2f4aedc7f1da8e5f9283 (diff) | |
help with casts, and lint hints.
Diffstat (limited to 'sys/lib/libsa/alloc.c')
| -rw-r--r-- | sys/lib/libsa/alloc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/lib/libsa/alloc.c b/sys/lib/libsa/alloc.c index 9b0f7dd56f8..fd378d958f9 100644 --- a/sys/lib/libsa/alloc.c +++ b/sys/lib/libsa/alloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: alloc.c,v 1.17 2003/08/07 16:32:25 agc Exp $ */ +/* $NetBSD: alloc.c,v 1.18 2004/06/30 13:58:16 christos Exp $ */ /* * Copyright (c) 1993 @@ -214,7 +214,7 @@ alloc(u_int size) if (top > (char*)HEAP_LIMIT) panic("heap full (0x%lx+%u)", help, size); #endif - *(unsigned *)help = ALIGN(size); + *(unsigned *)(void *)help = (unsigned)ALIGN(size); #ifdef ALLOC_TRACE printf("=%lx\n", (u_long)help + ALIGN(sizeof(unsigned))); #endif @@ -228,7 +228,7 @@ alloc(u_int size) found: #endif /* remove from freelist */ - help = (char*)*f; + help = (char *)(void *)*f; *f = (*f)->next; #ifdef ALLOC_TRACE printf("=%lx (origsize %u)\n", (u_long)help + ALIGN(sizeof(unsigned)), @@ -238,10 +238,11 @@ found: } void +/*ARGSUSED*/ free(void *ptr, u_int size) { struct fl *f = - (struct fl *)((char*)ptr - ALIGN(sizeof(unsigned))); + (struct fl *)(void *)((char*)(void *)ptr - ALIGN(sizeof(unsigned))); #ifdef ALLOC_TRACE printf("free(%lx, %u) (origsize %u)\n", (u_long)ptr, size, f->size); #endif |
