Source-Changes-HG archive

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

[src/trunk]: src/sys/net/npf Set con = NULL just once, instead of doing it in...



details:   https://anonhg.NetBSD.org/src/rev/3e0847975af3
branches:  trunk
changeset: 324551:3e0847975af3
user:      maxv <maxv%NetBSD.org@localhost>
date:      Tue Jul 10 12:31:46 2018 +0000

description:
Set con = NULL just once, instead of doing it in each branch.

diffstat:

 sys/net/npf/npf_handler.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r 0e8ed9222fec -r 3e0847975af3 sys/net/npf/npf_handler.c
--- a/sys/net/npf/npf_handler.c Tue Jul 10 11:21:34 2018 +0000
+++ b/sys/net/npf/npf_handler.c Tue Jul 10 12:31:46 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: npf_handler.c,v 1.39 2018/03/13 09:04:02 maxv Exp $    */
+/*     $NetBSD: npf_handler.c,v 1.40 2018/07/10 12:31:46 maxv Exp $    */
 
 /*-
  * Copyright (c) 2009-2013 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #ifdef _KERNEL
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_handler.c,v 1.39 2018/03/13 09:04:02 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_handler.c,v 1.40 2018/07/10 12:31:46 maxv Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -153,6 +153,7 @@
        decision = NPF_DECISION_BLOCK;
        error = 0;
        rp = NULL;
+       con = NULL;
 
        /* Cache everything. */
        flags = npf_cache_all(&npc);
@@ -170,7 +171,6 @@
                 */
                error = npf_reassembly(npf, &npc, mp);
                if (error) {
-                       con = NULL;
                        goto out;
                }
                if (*mp == NULL) {
@@ -181,7 +181,6 @@
 
        /* Just pass-through if specially tagged. */
        if (nbuf_find_tag(&nbuf, &ntag) == 0 && (ntag & NPF_NTAG_PASS) != 0) {
-               con = NULL;
                goto pass;
        }
 



Home | Main Index | Thread Index | Old Index