diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2022-02-08 11:28:20 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2022-02-08 11:28:20 +0000 |
commit | dec16a771fbac9038a34989e8d97276306ab8341 (patch) | |
tree | 6e5d1596f74084972d75bf37b86482a05d008919 /sys | |
parent | 9a83ef4a74329d644472e5c3bf3a5bc21a77f818 (diff) |
use sizeof(long) - 1 in m_pullup to determine payload alignment.
this makes it consistent with the rest of the network stack when
determining alignment.
ok bluhm@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index bbb69322c05..acac2c0dbc8 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf.c,v 1.280 2022/01/18 12:38:21 bluhm Exp $ */ +/* $OpenBSD: uipc_mbuf.c,v 1.281 2022/02/08 11:28:19 dlg Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */ /* @@ -945,9 +945,9 @@ m_pullup(struct mbuf *m0, int len) goto freem0; } - adj = mtod(m, unsigned long) & ALIGNBYTES; + adj = mtod(m, unsigned long) & (sizeof(long) - 1); } else - adj = mtod(m0, unsigned long) & ALIGNBYTES; + adj = mtod(m0, unsigned long) & (sizeof(long) - 1); tail = head + M_SIZE(m0); head += adj; |