Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146741558
D10940.id40593.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D10940.id40593.diff
View Options
Index: sys/netinet6/dest6.c
===================================================================
--- sys/netinet6/dest6.c
+++ sys/netinet6/dest6.c
@@ -93,7 +93,7 @@
opt = (u_int8_t *)dstopts + sizeof(struct ip6_dest);
/* search header for all options. */
- for (optlen = 0; dstoptlen > 0; dstoptlen -= optlen, opt += optlen) {
+ for (; dstoptlen > 0; dstoptlen -= optlen, opt += optlen) {
if (*opt != IP6OPT_PAD1 &&
(dstoptlen < IP6OPT_MINLEN || *(opt + 1) + 2 > dstoptlen)) {
IP6STAT_INC(ip6s_toosmall);
Index: sys/netinet6/icmp6.c
===================================================================
--- sys/netinet6/icmp6.c
+++ sys/netinet6/icmp6.c
@@ -594,7 +594,6 @@
n->m_pkthdr.len = n0len + (noff - off);
n->m_next = n0;
} else {
- nip6 = mtod(n, struct ip6_hdr *);
IP6_EXTHDR_GET(nicmp6, struct icmp6_hdr *, n, off,
sizeof(*nicmp6));
noff = off;
Index: sys/netinet6/ip6_output.c
===================================================================
--- sys/netinet6/ip6_output.c
+++ sys/netinet6/ip6_output.c
@@ -1048,7 +1048,7 @@
m = m0->m_nextpkt;
m0->m_nextpkt = 0;
m_freem(m0);
- for (m0 = m; m; m = m0) {
+ for (; m; m = m0) {
m0 = m->m_nextpkt;
m->m_nextpkt = 0;
if (error == 0) {
Index: sys/netinet6/udp6_usrreq.c
===================================================================
--- sys/netinet6/udp6_usrreq.c
+++ sys/netinet6/udp6_usrreq.c
@@ -220,7 +220,6 @@
uint8_t nxt;
ifp = m->m_pkthdr.rcvif;
- ip6 = mtod(m, struct ip6_hdr *);
#ifndef PULLDOWN_TEST
IP6_EXTHDR_CHECK(m, off, sizeof(struct udphdr), IPPROTO_DONE);
@@ -230,6 +229,7 @@
IP6_EXTHDR_GET(uh, struct udphdr *, m, off, sizeof(*uh));
if (!uh)
return (IPPROTO_DONE);
+ ip6 = mtod(m, struct ip6_hdr *);
#endif
UDPSTAT_INC(udps_ipackets);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 6, 5:05 AM (8 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29313622
Default Alt Text
D10940.id40593.diff (1 KB)
Attached To
Mode
D10940: Static analysis: Remove unused variables in IPv6 code
Attached
Detach File
Event Timeline
Log In to Comment