Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Remove unnecessary NULL check of rt_ifp



details:   https://anonhg.NetBSD.org/src/rev/d15b1dc6e19a
branches:  trunk
changeset: 356358:d15b1dc6e19a
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu Sep 21 04:44:32 2017 +0000

description:
Remove unnecessary NULL check of rt_ifp

It's always non-NULL.

diffstat:

 sys/net/route.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 517b3c9f0744 -r d15b1dc6e19a sys/net/route.c
--- a/sys/net/route.c   Thu Sep 21 01:15:45 2017 +0000
+++ b/sys/net/route.c   Thu Sep 21 04:44:32 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route.c,v 1.197 2017/06/28 04:10:47 ozaki-r Exp $      */
+/*     $NetBSD: route.c,v 1.198 2017/09/21 04:44:32 ozaki-r Exp $      */
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.197 2017/06/28 04:10:47 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.198 2017/09/21 04:44:32 ozaki-r Exp $");
 
 #include <sys/param.h>
 #ifdef RTFLUSH_DEBUG
@@ -2029,7 +2029,7 @@
        }
 
        RT_RLOCK();
-       if (rt != NULL && (rt->rt_flags & RTF_UP) != 0 && rt->rt_ifp != NULL) {
+       if (rt != NULL && (rt->rt_flags & RTF_UP) != 0) {
 #ifdef NET_MPSAFE
                if (ISSET(rt->rt_flags, RTF_UPDATING)) {
                        if (rt_wait_ok()) {



Home | Main Index | Thread Index | Old Index