Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet CID 12164{49, 51}: Remove bogus ifp == NULL check...
details: https://anonhg.NetBSD.org/src/rev/114d85aca1ba
branches: trunk
changeset: 329556:114d85aca1ba
user: christos <christos%NetBSD.org@localhost>
date: Wed May 28 19:19:33 2014 +0000
description:
CID 12164{49,51}: Remove bogus ifp == NULL checks; if ifp was really NULL,
we would have been dead a few lines before the tests.
diffstat:
sys/netinet/ip_input.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r e66c2a369412 -r 114d85aca1ba sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c Wed May 28 19:14:17 2014 +0000
+++ b/sys/netinet/ip_input.c Wed May 28 19:19:33 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_input.c,v 1.314 2014/05/23 23:38:48 rmind Exp $ */
+/* $NetBSD: ip_input.c,v 1.315 2014/05/28 19:19:33 christos Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.314 2014/05/23 23:38:48 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.315 2014/05/28 19:19:33 christos Exp $");
#include "opt_inet.h"
#include "opt_compat_netbsd.h"
@@ -587,7 +587,7 @@
* we get finer grain control.
*/
checkif = ip_checkinterface && (ipforwarding == 0) &&
- ifp && (ifp->if_flags & IFF_LOOPBACK) == 0;
+ (ifp->if_flags & IFF_LOOPBACK) == 0;
/*
* Check our list of addresses, to see if the packet is for us.
@@ -609,7 +609,7 @@
}
if (ia != NULL)
goto ours;
- if (ifp && ifp->if_flags & IFF_BROADCAST) {
+ if (ifp->if_flags & IFF_BROADCAST) {
IFADDR_FOREACH(ifa, ifp) {
if (ifa->ifa_addr->sa_family != AF_INET)
continue;
Home |
Main Index |
Thread Index |
Old Index