From b51defdf7726051a7481fc33563af0c48a1ca255 Mon Sep 17 00:00:00 2001 From: tobhe Date: Fri, 6 Mar 2020 10:40:13 +0000 Subject: Fix uninitialized use of variable 'len'. ok bluhm@ --- sys/netinet/ip_output.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'sys/netinet/ip_output.c') 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 *); -- cgit v1.2.3-59-g8ed1b