diff options
author | Thomas Nordin <nordin@cvs.openbsd.org> | 2002-01-05 00:20:46 +0000 |
---|---|---|
committer | Thomas Nordin <nordin@cvs.openbsd.org> | 2002-01-05 00:20:46 +0000 |
commit | f75648638c499e107d511915333b10144b2ba028 (patch) | |
tree | 1fc027b11c4599ee67a57f142b1b03aa8f3d8adb /sys | |
parent | 3fb969af7594c5af40b6e501153c8ba9835af5ec (diff) |
Avoid using an uninitialized variable. dhartmei@ ok
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_icmp.c | 9 |
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; |