Source-Changes-HG archive

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

[src/trunk]: src/sys/net/npf npf_iscached: add an assert.



details:   https://anonhg.NetBSD.org/src/rev/fe08b734b0cd
branches:  trunk
changeset: 330822:fe08b734b0cd
user:      rmind <rmind%NetBSD.org@localhost>
date:      Wed Jul 23 01:48:05 2014 +0000

description:
npf_iscached: add an assert.

diffstat:

 sys/net/npf/npf.h |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r b763de1070c3 -r fe08b734b0cd sys/net/npf/npf.h
--- a/sys/net/npf/npf.h Wed Jul 23 01:25:34 2014 +0000
+++ b/sys/net/npf/npf.h Wed Jul 23 01:48:05 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: npf.h,v 1.45 2014/07/23 01:25:34 rmind Exp $   */
+/*     $NetBSD: npf.h,v 1.46 2014/07/23 01:48:05 rmind Exp $   */
 
 /*-
  * Copyright (c) 2009-2014 The NetBSD Foundation, Inc.
@@ -172,6 +172,7 @@
 static inline bool
 npf_iscached(const npf_cache_t *npc, const int inf)
 {
+       KASSERT(npc->npc_nbuf != NULL);
        return __predict_true((npc->npc_info & inf) != 0);
 }
 



Home | Main Index | Thread Index | Old Index