From f496a53cbfb42bce1111117ab535d671ebd48761 Mon Sep 17 00:00:00 2001 From: cgd Date: Thu, 26 Sep 1996 23:15:00 +0000 Subject: [PATCH] make sure new allocations are aligned. --- sys/lib/libsa/alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/lib/libsa/alloc.c b/sys/lib/libsa/alloc.c index 32b7bd0b6b23..37e98efe75d1 100644 --- a/sys/lib/libsa/alloc.c +++ b/sys/lib/libsa/alloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: alloc.c,v 1.3 1994/10/26 05:44:34 cgd Exp $ */ +/* $NetBSD: alloc.c,v 1.4 1996/09/26 23:15:00 cgd Exp $ */ /*- * Copyright (c) 1993 @@ -89,8 +89,8 @@ alloc(size) f = f->next; } if (f == (struct fl *)0) { - f = (struct fl *)top; - top += ALIGN(size); + f = (struct fl *)ALIGN(top); + top = (char *)f + ALIGN(size); } else *prev = f->next; return ((void *)f);