Module Name:    src
Committed By:   mrg
Date:           Fri Nov  1 06:42:23 UTC 2013

Modified Files:
        src/sys/external/bsd/ipf/netinet: ip_fil_netbsd.c

Log Message:
move variable definition/set inside the same #ifdef of the usage.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c
diff -u src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.6 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.7
--- src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.6	Sat Sep 14 11:39:08 2013
+++ src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c	Fri Nov  1 06:42:23 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_fil_netbsd.c,v 1.6 2013/09/14 11:39:08 martin Exp $	*/
+/*	$NetBSD: ip_fil_netbsd.c,v 1.7 2013/11/01 06:42:23 mrg Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -8,7 +8,7 @@
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.6 2013/09/14 11:39:08 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.7 2013/11/01 06:42:23 mrg Exp $");
 #else
 static const char sccsid[] = "@(#)ip_fil.c	2.41 6/5/96 (C) 1993-2000 Darren Reed";
 static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp";
@@ -843,13 +843,14 @@ ipf_send_ip(fr_info_t *fin, mb_t *m)
 int
 ipf_send_icmp_err(int type, fr_info_t *fin, int dst)
 {
-	int err, hlen, xtra, iclen, ohlen, avail, code;
+	int err, hlen, xtra, iclen, ohlen, avail;
 	struct in_addr dst4;
 	struct icmp *icmp;
 	struct mbuf *m;
 	i6addr_t dst6;
 	void *ifp;
 #ifdef USE_INET6
+	int code;
 	ip6_t *ip6;
 #endif
 	ip_t *ip, *ip2;
@@ -857,8 +858,8 @@ ipf_send_icmp_err(int type, fr_info_t *f
 	if ((type < 0) || (type > ICMP_MAXTYPE))
 		return -1;
 
-	code = fin->fin_icode;
 #ifdef USE_INET6
+	code = fin->fin_icode;
 	if ((code < 0) || (code >= sizeof(icmptoicmp6unreach)/sizeof(int)))
 		return -1;
 #endif

Reply via email to