diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2003-02-17 03:51:44 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2003-02-17 03:51:44 +0000 |
| commit | decb00f6770a1e059fa7f9ee83cc6b103c48cf54 (patch) | |
| tree | c43283d90f3a5562b9783023cb26bec033acad15 /bin/sh/memalloc.c | |
| parent | e4625663c91c25e02fae5e6f2560b6aad6ef55bb (diff) | |
Notes
Diffstat (limited to 'bin/sh/memalloc.c')
| -rw-r--r-- | bin/sh/memalloc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/sh/memalloc.c b/bin/sh/memalloc.c index a50d6617debc..c3e5fcaecf7e 100644 --- a/bin/sh/memalloc.c +++ b/bin/sh/memalloc.c @@ -42,11 +42,12 @@ static char sccsid[] = "@(#)memalloc.c 8.3 (Berkeley) 5/4/95"; #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include <sys/param.h> + #include "shell.h" #include "output.h" #include "memalloc.h" #include "error.h" -#include "machdep.h" #include "mystring.h" #include "expand.h" #include <stdlib.h> @@ -139,8 +140,8 @@ stalloc(int nbytes) sp = ckmalloc(sizeof(struct stack_block) - MINSIZE + blocksize); sp->prev = stackp; - stacknxt = sp->space; - stacknleft = blocksize; + stacknxt = (char *)ALIGN(sp->space); + stacknleft = blocksize - (stacknxt - sp->space); stackp = sp; INTON; } |
