summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorThomas Nordin <nordin@cvs.openbsd.org>2002-01-05 00:20:46 +0000
committerThomas Nordin <nordin@cvs.openbsd.org>2002-01-05 00:20:46 +0000
commitf75648638c499e107d511915333b10144b2ba028 (patch)
tree1fc027b11c4599ee67a57f142b1b03aa8f3d8adb /sys
parent3fb969af7594c5af40b6e501153c8ba9835af5ec (diff)
Avoid using an uninitialized variable. dhartmei@ ok
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_icmp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 11c8a31c6dc..0fbc68d3070 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_icmp.c,v 1.42 2001/07/04 16:52:03 dhartmei Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.43 2002/01/05 00:20:45 nordin Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
@@ -508,9 +508,10 @@ icmp_input(m, va_alist)
icmpdst.sin_addr = ip->ip_src;
else
icmpdst.sin_addr = ip->ip_dst;
- if (m->m_pkthdr.rcvif != NULL)
- ia = ifatoia(ifaof_ifpforaddr(sintosa(&icmpdst),
- m->m_pkthdr.rcvif));
+ if (m->m_pkthdr.rcvif == NULL)
+ break;
+ ia = ifatoia(ifaof_ifpforaddr(sintosa(&icmpdst),
+ m->m_pkthdr.rcvif));
if (ia == 0)
break;
icp->icmp_type = ICMP_MASKREPLY;