diff options
author | bmilekic <bmilekic@FreeBSD.org> | 2000-11-11 23:05:59 +0000 |
---|---|---|
committer | bmilekic <bmilekic@FreeBSD.org> | 2000-11-11 23:05:59 +0000 |
commit | 22569f9f9638cf65887c878f12bf35e617fd8e17 (patch) | |
tree | 9df5cd2361b9fcb81a38f71a6f1e3dfdd6211d64 /sys | |
parent | 4ddcfae4cab3df192125ede9f834bfe2a6322b19 (diff) | |
download | FreeBSD-src-22569f9f9638cf65887c878f12bf35e617fd8e17.zip FreeBSD-src-22569f9f9638cf65887c878f12bf35e617fd8e17.tar.gz |
While I'm here, get rid of (now useless) MCLISREFERENCED and use MEXT_IS_REF
instead.
Also, fix a small set of "avail." If we're setting `avail,' we shouldn't
be re-checking whether m_flags is M_EXT, because we know that it is, as if
it wasn't, we would have already returned several lines above.
Reviewed by: jlemon
Diffstat (limited to 'sys')
-rw-r--r-- | sys/contrib/ipfilter/netinet/ip_fil.c | 8 | ||||
-rw-r--r-- | sys/netinet/ip_fil.c | 8 |
2 files changed, 4 insertions, 12 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_fil.c b/sys/contrib/ipfilter/netinet/ip_fil.c index 797e599..ff80058 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.c +++ b/sys/contrib/ipfilter/netinet/ip_fil.c @@ -1162,7 +1162,7 @@ int dst; m->m_len = 0; avail = M_TRAILINGSPACE(m); # else - avail = (m->m_flags & M_EXT) ? MCLBYTES : MHLEN; + avail = MCLBYTES; # endif xtra = MIN(ntohs(oip6->ip6_plen) + sizeof(ip6_t), avail - hlen - sizeof(*icmp) - max_linkhdr); @@ -1382,11 +1382,7 @@ frdest_t *fdp; # if BSD >= 199306 int i = 0; -# ifdef MCLISREFERENCED - if ((m->m_flags & M_EXT) && MCLISREFERENCED(m)) -# else - if (m->m_flags & M_EXT) -# endif + if ((m->m_flags & M_EXT) && MEXT_IS_REF(m)) i = 1; # endif # ifndef sparc diff --git a/sys/netinet/ip_fil.c b/sys/netinet/ip_fil.c index 797e599..ff80058 100644 --- a/sys/netinet/ip_fil.c +++ b/sys/netinet/ip_fil.c @@ -1162,7 +1162,7 @@ int dst; m->m_len = 0; avail = M_TRAILINGSPACE(m); # else - avail = (m->m_flags & M_EXT) ? MCLBYTES : MHLEN; + avail = MCLBYTES; # endif xtra = MIN(ntohs(oip6->ip6_plen) + sizeof(ip6_t), avail - hlen - sizeof(*icmp) - max_linkhdr); @@ -1382,11 +1382,7 @@ frdest_t *fdp; # if BSD >= 199306 int i = 0; -# ifdef MCLISREFERENCED - if ((m->m_flags & M_EXT) && MCLISREFERENCED(m)) -# else - if (m->m_flags & M_EXT) -# endif + if ((m->m_flags & M_EXT) && MEXT_IS_REF(m)) i = 1; # endif # ifndef sparc |