uipc_mbuf2.c (331722) | uipc_mbuf2.c (350829) |
---|---|
1/* $KAME: uipc_mbuf2.c,v 1.31 2001/11/28 11:08:53 itojun Exp $ */ 2/* $NetBSD: uipc_mbuf.c,v 1.40 1999/04/01 00:23:25 thorpej Exp $ */ 3 4/*- 5 * Copyright (C) 1999 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 47 unchanged lines hidden (view full) --- 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 * 60 * @(#)uipc_mbuf.c 8.4 (Berkeley) 2/14/95 61 */ 62 63#include <sys/cdefs.h> | 1/* $KAME: uipc_mbuf2.c,v 1.31 2001/11/28 11:08:53 itojun Exp $ */ 2/* $NetBSD: uipc_mbuf.c,v 1.40 1999/04/01 00:23:25 thorpej Exp $ */ 3 4/*- 5 * Copyright (C) 1999 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 47 unchanged lines hidden (view full) --- 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 * 60 * @(#)uipc_mbuf.c 8.4 (Berkeley) 2/14/95 61 */ 62 63#include <sys/cdefs.h> |
64__FBSDID("$FreeBSD: stable/11/sys/kern/uipc_mbuf2.c 331722 2018-03-29 02:50:57Z eadler $"); | 64__FBSDID("$FreeBSD: stable/11/sys/kern/uipc_mbuf2.c 350829 2019-08-10 00:02:45Z jtl $"); |
65 66/*#define PULLDOWN_DEBUG*/ 67 68#include <sys/param.h> 69#include <sys/systm.h> 70#include <sys/kernel.h> 71#include <sys/lock.h> 72#include <sys/malloc.h> --- 136 unchanged lines hidden (view full) --- 209 if ((off == 0 || offp) && M_TRAILINGSPACE(n) >= tlen 210 && writable) { 211 m_copydata(n->m_next, 0, tlen, mtod(n, caddr_t) + n->m_len); 212 n->m_len += tlen; 213 m_adj(n->m_next, tlen); 214 goto ok; 215 } 216 if ((off == 0 || offp) && M_LEADINGSPACE(n->m_next) >= hlen | 65 66/*#define PULLDOWN_DEBUG*/ 67 68#include <sys/param.h> 69#include <sys/systm.h> 70#include <sys/kernel.h> 71#include <sys/lock.h> 72#include <sys/malloc.h> --- 136 unchanged lines hidden (view full) --- 209 if ((off == 0 || offp) && M_TRAILINGSPACE(n) >= tlen 210 && writable) { 211 m_copydata(n->m_next, 0, tlen, mtod(n, caddr_t) + n->m_len); 212 n->m_len += tlen; 213 m_adj(n->m_next, tlen); 214 goto ok; 215 } 216 if ((off == 0 || offp) && M_LEADINGSPACE(n->m_next) >= hlen |
217 && writable) { | 217 && writable && n->m_next->m_len >= tlen) { |
218 n->m_next->m_data -= hlen; 219 n->m_next->m_len += hlen; 220 bcopy(mtod(n, caddr_t) + off, mtod(n->m_next, caddr_t), hlen); 221 n->m_len -= hlen; 222 n = n->m_next; 223 off = 0; 224 goto ok; 225 } --- 226 unchanged lines hidden --- | 218 n->m_next->m_data -= hlen; 219 n->m_next->m_len += hlen; 220 bcopy(mtod(n, caddr_t) + off, mtod(n->m_next, caddr_t), hlen); 221 n->m_len -= hlen; 222 n = n->m_next; 223 off = 0; 224 goto ok; 225 } --- 226 unchanged lines hidden --- |