diff options
author | simokawa <simokawa@FreeBSD.org> | 1999-01-13 10:37:22 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 1999-01-13 10:37:22 +0000 |
commit | 2373cd9b47117aa2eac944cc36f5e88afd7acbef (patch) | |
tree | 8c16aacdd5d6b9ac511b58955e7f014597444f1a /usr.bin | |
parent | c9b65ff0dd6a4ce2f7d373cc49e1d6e16f7ca32c (diff) | |
download | FreeBSD-src-2373cd9b47117aa2eac944cc36f5e88afd7acbef.zip FreeBSD-src-2373cd9b47117aa2eac944cc36f5e88afd7acbef.tar.gz |
Allocate aligned memory according to sizeof(char *).
Approved by: jkh
Obtained from: NetBSD
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mail/strings.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mail/strings.c b/usr.bin/mail/strings.c index f27b959..2f24f31 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) |