From dec16a771fbac9038a34989e8d97276306ab8341 Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Tue, 8 Feb 2022 11:28:20 +0000 Subject: 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@ --- sys/kern/uipc_mbuf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') 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; -- cgit v1.2.3