From 2a3560b50ea0bd4f1996b6074e5b66dfbb13521c Mon Sep 17 00:00:00 2001 From: glebius Date: Wed, 11 May 2005 08:28:09 +0000 Subject: Move assertion below initializer. Submitted by: Noritoshi Demizu Pointy hat to: glebius --- sys/netgraph/ng_nat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netgraph/ng_nat.c b/sys/netgraph/ng_nat.c index e90e1f1..2395ce5 100644 --- a/sys/netgraph/ng_nat.c +++ b/sys/netgraph/ng_nat.c @@ -223,12 +223,12 @@ ng_nat_rcvdata(hook_p hook, item_p item ) NGI_M(item) = m; - KASSERT(m->m_pkthdr.len == ntohs(ip->ip_len), - ("ng_nat: ip_len != m_pkthdr.len")); - c = mtod(m, char *); ip = mtod(m, struct ip *); + KASSERT(m->m_pkthdr.len == ntohs(ip->ip_len), + ("ng_nat: ip_len != m_pkthdr.len")); + if (hook == priv->in) { rval = LibAliasIn(priv->lib, c, MCLBYTES); if (rval != PKT_ALIAS_OK) { -- cgit v1.1