Source-Changes-HG archive

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

[src/trunk]: src/sys/net remove duplicated null ckeck



details:   https://anonhg.NetBSD.org/src/rev/7e33c5ccf0a7
branches:  trunk
changeset: 358314:7e33c5ccf0a7
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Thu Dec 21 09:35:38 2017 +0000

description:
remove duplicated null ckeck

diffstat:

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

diffs (33 lines):

diff -r e27be5f7f9fd -r 7e33c5ccf0a7 sys/net/if_gif.c
--- a/sys/net/if_gif.c  Thu Dec 21 09:31:22 2017 +0000
+++ b/sys/net/if_gif.c  Thu Dec 21 09:35:38 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_gif.c,v 1.136 2017/12/09 08:03:06 pgoyette Exp $    */
+/*     $NetBSD: if_gif.c,v 1.137 2017/12/21 09:35:38 knakahara Exp $   */
 /*     $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $    */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.136 2017/12/09 08:03:06 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.137 2017/12/21 09:35:38 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -382,13 +382,10 @@
                return 0;
 
        var = gif_getref_variant(sc, &psref);
+       /* no physical address */
        if (var->gv_psrc == NULL || var->gv_pdst == NULL)
                goto out;
 
-       /* no physical address */
-       if (!var->gv_psrc || !var->gv_pdst)
-               goto out;
-
        switch (proto) {
 #ifdef INET
        case IPPROTO_IPV4:



Home | Main Index | Thread Index | Old Index