diff options
author | 2020-03-06 10:40:13 +0000 | |
---|---|---|
committer | 2020-03-06 10:40:13 +0000 | |
commit | b51defdf7726051a7481fc33563af0c48a1ca255 (patch) | |
tree | cd5a8c535a8f065bd82cfab2163f3dfbdcda4f92 /sys/netinet | |
parent | Fixup bwfm(4) register bit regarding SDIO device suspend/resume. (diff) | |
download | wireguard-openbsd-b51defdf7726051a7481fc33563af0c48a1ca255.tar.xz wireguard-openbsd-b51defdf7726051a7481fc33563af0c48a1ca255.zip |
Fix uninitialized use of variable 'len'.
ok bluhm@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_output.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 7bc8254d3de..2fca6974b35 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.355 2019/06/10 16:32:51 mpi Exp $ */ +/* $OpenBSD: ip_output.c,v 1.356 2020/03/06 10:40:13 tobhe Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -101,7 +101,7 @@ ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro, int flags, struct ifnet *ifp = NULL; struct mbuf *m = m0; int hlen = sizeof (struct ip); - int len, error = 0; + int error = 0; struct route iproute; struct sockaddr_in *dst; struct tdb *tdb = NULL; @@ -121,10 +121,8 @@ ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro, int flags, if ((m->m_flags & M_PKTHDR) == 0) panic("ip_output no HDR"); #endif - if (opt) { - m = ip_insertoptions(m, opt, &len); - hlen = len; - } + if (opt) + m = ip_insertoptions(m, opt, &hlen); ip = mtod(m, struct ip *); |