summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_bge.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-10-28 22:14:48 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-10-28 22:14:48 +0000
commit44a0e294d9c521a86958e94b01e28c823699d44c (patch)
tree499629323658caa77e43c0571c6c75cfaa05756e /sys/dev/pci/if_bge.c
parent0f9bae4aff082f19e21ef9f53f414a8fddc7796f (diff)
M_TRAILINGSPACE(m) returns 0 if M_READONLY(m) is true,
so no need to call both. From tsutsui@NetBSD
Diffstat (limited to 'sys/dev/pci/if_bge.c')
-rw-r--r--sys/dev/pci/if_bge.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index fe4b201b298..53210cafd64 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.194 2006/10/26 22:57:17 brad Exp $ */
+/* $OpenBSD: if_bge.c,v 1.195 2006/10/28 22:14:47 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -2604,8 +2604,7 @@ bge_compact_dma_runt(struct mbuf *pkt)
*/
/* Internal frag. If fits in prev, copy it there. */
- if (prev && !M_READONLY(prev) &&
- M_TRAILINGSPACE(prev) >= m->m_len) {
+ if (prev && M_TRAILINGSPACE(prev) >= m->m_len) {
bcopy(m->m_data,
prev->m_data+prev->m_len,
mlen);
@@ -2615,7 +2614,7 @@ bge_compact_dma_runt(struct mbuf *pkt)
prev->m_next = m_free(m);
m = prev;
continue;
- } else if (m->m_next != NULL && !M_READONLY(m) &&
+ } else if (m->m_next != NULL &&
M_TRAILINGSPACE(m) >= shortfall &&
m->m_next->m_len >= (8 + shortfall)) {
/* m is writable and have enough data in next, pull up. */