Source-Changes-HG archive

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

[src/trunk]: src/sys/net Fix logic inversion spotted by paulg



details:   https://anonhg.NetBSD.org/src/rev/8a5ac831ad79
branches:  trunk
changeset: 821167:8a5ac831ad79
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Jan 26 21:38:11 2017 +0000

description:
Fix logic inversion spotted by paulg

diffstat:

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

diffs (27 lines):

diff -r de80f4dc2928 -r 8a5ac831ad79 sys/net/if_tun.c
--- a/sys/net/if_tun.c  Thu Jan 26 21:13:19 2017 +0000
+++ b/sys/net/if_tun.c  Thu Jan 26 21:38:11 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tun.c,v 1.136 2017/01/26 21:13:19 skrll Exp $       */
+/*     $NetBSD: if_tun.c,v 1.137 2017/01/26 21:38:11 skrll Exp $       */
 
 /*
  * Copyright (c) 1988, Julian Onions <jpo%cs.nott.ac.uk@localhost>
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.136 2017/01/26 21:13:19 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.137 2017/01/26 21:38:11 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -196,7 +196,7 @@
        if (tp)
                LIST_REMOVE(tp, tun_list);
        mutex_exit(&tun_softc_lock);
-       KASSERTMSG(!tp || (tp->tun_flags & (TUN_INITED|TUN_OPEN)) != TUN_OPEN,
+       KASSERTMSG(!tp || (tp->tun_flags & (TUN_INITED|TUN_OPEN)) == TUN_OPEN,
            "tun%d: inconsistent flags: %x", unit, tp->tun_flags);
 
        return tp;



Home | Main Index | Thread Index | Old Index