summaryrefslogtreecommitdiffstats
path: root/usr.bin/mail/strings.c
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>1999-01-13 10:37:22 +0000
committersimokawa <simokawa@FreeBSD.org>1999-01-13 10:37:22 +0000
commit2373cd9b47117aa2eac944cc36f5e88afd7acbef (patch)
tree8c16aacdd5d6b9ac511b58955e7f014597444f1a /usr.bin/mail/strings.c
parentc9b65ff0dd6a4ce2f7d373cc49e1d6e16f7ca32c (diff)
downloadFreeBSD-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/mail/strings.c')
-rw-r--r--usr.bin/mail/strings.c4
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)
OpenPOWER on IntegriCloud