From 0b919713bbb1021268f01b400f3bb624b4537136 Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Wed, 13 Jan 1999 10:37:22 +0000 Subject: [PATCH] Allocate aligned memory according to sizeof(char *). Approved by: jkh Obtained from: NetBSD --- usr.bin/mail/strings.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/mail/strings.c b/usr.bin/mail/strings.c index f27b959fd50e..2f24f31c80e5 100644 --- a/usr.bin/mail/strings.c +++ b/usr.bin/mail/strings.c @@ -64,8 +64,8 @@ salloc(size) int index; s = size; - s += 3; - s &= ~03; + s += (sizeof (char *) - 1); + s &= ~(sizeof (char *) - 1); index = 0; for (sp = &stringdope[0]; sp < &stringdope[NSPACE]; sp++) { if (sp->s_topFree == NOSTR && (STRINGSIZE << index) >= s)