summaryrefslogtreecommitdiffstats
path: root/sys/lib/libsa/alloc.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2002-03-14 03:15:49 +0000
committermillert <millert@openbsd.org>2002-03-14 03:15:49 +0000
commit4f9e30d05c4b39ece1e3c5a9323df2ddfd85bd9b (patch)
tree021b0ffa6ce82de256743d5f188c18bf3aee34de /sys/lib/libsa/alloc.c
parentgenerate std ANSI protos, not __P ones (diff)
downloadwireguard-openbsd-4f9e30d05c4b39ece1e3c5a9323df2ddfd85bd9b.tar.xz
wireguard-openbsd-4f9e30d05c4b39ece1e3c5a9323df2ddfd85bd9b.zip
Final __P removal plus some cosmetic fixups
Diffstat (limited to 'sys/lib/libsa/alloc.c')
-rw-r--r--sys/lib/libsa/alloc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/lib/libsa/alloc.c b/sys/lib/libsa/alloc.c
index 0d90622c914..34fcf0aba79 100644
--- a/sys/lib/libsa/alloc.c
+++ b/sys/lib/libsa/alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: alloc.c,v 1.5 1997/08/01 21:57:09 pefo Exp $ */
+/* $OpenBSD: alloc.c,v 1.6 2002/03/14 03:16:09 millert Exp $ */
/* $NetBSD: alloc.c,v 1.6 1997/02/04 18:36:33 thorpej Exp $ */
/*
@@ -116,7 +116,7 @@ struct fl {
} *freelist = (struct fl *)0;
#ifdef HEAP_START
-static char *top = (char*)HEAP_START;
+static char *top = (char *)HEAP_START;
#else
extern char end[];
static char *top = end;
@@ -174,7 +174,7 @@ alloc(size)
size = ALIGN(sizeof (struct fl *));
top += ALIGN(sizeof(unsigned)) + ALIGN(size);
#ifdef HEAP_LIMIT
- if (top > (char*)HEAP_LIMIT)
+ if (top > (char *)HEAP_LIMIT)
panic("heap full (0x%lx+%u)", help, size);
#endif
*(unsigned *)help = ALIGN(size);
@@ -191,7 +191,7 @@ alloc(size)
found:
#endif
/* remove from freelist */
- help = (char*)*f;
+ help = (char *)*f;
*f = (*f)->next;
#ifdef ALLOC_TRACE
printf("=%p (origsize %u)\n", help + ALIGN(sizeof(unsigned)),
@@ -206,7 +206,7 @@ free(ptr, size)
unsigned size; /* only for consistence check */
{
register struct fl *f =
- (struct fl *)((char*)ptr - ALIGN(sizeof(unsigned)));
+ (struct fl *)((char *)ptr - ALIGN(sizeof(unsigned)));
#ifdef ALLOC_TRACE
printf("free(%p, %u) (origsize %u)\n", ptr, size, f->size);
#endif