Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet fix unused variable warnings when LARGE_NAT is d...



details:   https://anonhg.NetBSD.org/src/rev/560e7a64d20c
branches:  trunk
changeset: 555921:560e7a64d20c
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Dec 04 15:32:01 2003 +0000

description:
fix unused variable warnings when LARGE_NAT is defined.

diffstat:

 sys/netinet/ip_nat.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r b6b71ca6387d -r 560e7a64d20c sys/netinet/ip_nat.c
--- a/sys/netinet/ip_nat.c      Thu Dec 04 15:00:32 2003 +0000
+++ b/sys/netinet/ip_nat.c      Thu Dec 04 15:32:01 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_nat.c,v 1.54 2002/09/24 14:14:25 sommerfeld Exp $   */
+/*     $NetBSD: ip_nat.c,v 1.55 2003/12/04 15:32:01 christos Exp $     */
 
 /*
  * Copyright (C) 1995-2001 by Darren Reed.
@@ -112,7 +112,7 @@
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.54 2002/09/24 14:14:25 sommerfeld Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.55 2003/12/04 15:32:01 christos Exp $");
 #else
 static const char sccsid[] = "@(#)ip_nat.c     1.11 6/5/96 (C) 1995 Darren Reed";
 static const char rcsid[] = "@(#)Id: ip_nat.c,v 2.37.2.70 2002/08/28 12:45:48 darrenr Exp";
@@ -2960,11 +2960,10 @@
 struct nat *nat;
 u_int type;
 {
-       struct ipnat *np;
        struct natlog natl;
        void *items[1];
        size_t sizes[1];
-       int rulen, types[1];
+       int types[1];
 
        natl.nl_inip = nat->nat_inip;
        natl.nl_outip = nat->nat_outip;
@@ -2979,6 +2978,8 @@
        natl.nl_rule = -1;
 #ifndef LARGE_NAT
        if (nat->nat_ptr != NULL) {
+               struct ipnat *np;
+               int rulen;
                for (rulen = 0, np = nat_list; np; np = np->in_next, rulen++)
                        if (np == nat->nat_ptr) {
                                natl.nl_rule = rulen;



Home | Main Index | Thread Index | Old Index