Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Oct 2008 13:28:02 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 151482 for review
Message-ID:  <200810171328.m9HDS2aF039954@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=151482

Change 151482 by zec@zec_tpx32 on 2008/10/17 13:27:48

	Abandon a few initial value assignments at variable definition
	point.
	
	More whitespace diff redux against head.

Affected files ...

.. //depot/projects/vimage/src/sys/contrib/pf/net/pf_subr.c#11 edit
.. //depot/projects/vimage/src/sys/kern/kern_jail.c#15 edit
.. //depot/projects/vimage/src/sys/kern/uipc_accf.c#3 edit
.. //depot/projects/vimage/src/sys/net/if.c#44 edit
.. //depot/projects/vimage/src/sys/net/if_ethersubr.c#29 edit
.. //depot/projects/vimage/src/sys/net/if_loop.c#29 edit
.. //depot/projects/vimage/src/sys/net/route.c#31 edit
.. //depot/projects/vimage/src/sys/netinet/vinet.h#33 edit
.. //depot/projects/vimage/src/sys/netinet6/in6_proto.c#31 edit
.. //depot/projects/vimage/src/sys/netinet6/nd6.h#9 edit
.. //depot/projects/vimage/src/sys/netinet6/nd6_nbr.c#24 edit
.. //depot/projects/vimage/src/sys/netinet6/vinet6.h#23 edit

Differences ...

==== //depot/projects/vimage/src/sys/contrib/pf/net/pf_subr.c#11 (text+ko) ====

@@ -65,7 +65,6 @@
 #include <netinet/tcp_timer.h>
 #include <netinet/tcp_var.h>
 #include <netinet/if_ether.h>
-
 #include <net/pfvar.h>
 
 /*

==== //depot/projects/vimage/src/sys/kern/kern_jail.c#15 (text+ko) ====

@@ -35,7 +35,6 @@
 #include <sys/sysctl.h>
 #include <sys/vnode.h>
 #include <sys/vimage.h>
-
 #include <net/if.h>
 #include <netinet/in.h>
 

==== //depot/projects/vimage/src/sys/kern/uipc_accf.c#3 (text+ko) ====


==== //depot/projects/vimage/src/sys/net/if.c#44 (text+ko) ====

@@ -142,17 +142,16 @@
 static	if_com_alloc_t *if_com_alloc[256];
 static	if_com_free_t *if_com_free[256];
 #ifndef VIMAGE
-int	if_index = 0;
+int	if_index;
 struct	ifnethead ifnet;	/* depend on static init XXX */
 struct	ifgrouphead ifg_head;
-
 static int	if_indexlim;
 static struct	knlist ifklist;
 
 /*
  * Table of ifnet/cdev by index.  Locked with ifnet_lock.
  */
-static struct ifindex_entry *ifindex_table = NULL;
+static struct ifindex_entry *ifindex_table;
 #endif /* !VIMAGE */
 
 static void	filt_netdetach(struct knote *kn);
@@ -689,7 +688,7 @@
 	splx(s);
 }
 SYSINIT(domainifattach, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_SECOND,
-	if_attachdomain, NULL);
+    if_attachdomain, NULL);
 
 static void
 if_attachdomain1(struct ifnet *ifp)
@@ -2944,7 +2943,7 @@
 if_register_com_alloc(u_char type,
     if_com_alloc_t *a, if_com_free_t *f)
 {
-
+	
 	KASSERT(if_com_alloc[type] == NULL,
 	    ("if_register_com_alloc: %d already registered", type));
 	KASSERT(if_com_free[type] == NULL,

==== //depot/projects/vimage/src/sys/net/if_ethersubr.c#29 (text+ko) ====


==== //depot/projects/vimage/src/sys/net/if_loop.c#29 (text+ko) ====

@@ -108,7 +108,7 @@
 #endif
 
 #ifndef VIMAGE
-struct ifnet *loif = NULL;			/* Used externally */
+struct ifnet *loif;			/* Used externally */
 static LIST_HEAD(lo_list, lo_softc) lo_list;
 #endif /* !VIMAGE */
 

==== //depot/projects/vimage/src/sys/net/route.c#31 (text+ko) ====

@@ -84,9 +84,6 @@
     &rt_add_addr_allfibs, 0, "");
 TUNABLE_INT("net.add_addr_allfibs", &rt_add_addr_allfibs);
 
-#ifndef VIMAGE
-static struct rtstat rtstat;
-
 /* by default only the first 'row' of tables will be accessed. */
 /* 
  * XXXMRT When we fix netstat, and do this differnetly,
@@ -94,8 +91,9 @@
  * things backwards compaitble we need to allocate this 
  * statically.
  */
+#ifndef VIMAGE
 struct radix_node_head *rt_tables[RT_MAXFIBS][AF_MAX+1];
-
+static struct rtstat rtstat;
 static int	rttrash;		/* routes not in table but not freed */
 #endif /* !VIMAGE */
 

==== //depot/projects/vimage/src/sys/netinet/vinet.h#33 (text+ko) ====

@@ -209,7 +209,6 @@
 #define	V_arp_maxtries		VNET_INET(arp_maxtries)
 #define	V_arp_proxyall		VNET_INET(arp_proxyall)
 #define	V_arpt_keep		VNET_INET(arpt_keep)
-#define	V_arpt_prune		VNET_INET(arpt_prune)
 #define	V_blackhole		VNET_INET(blackhole)
 #define	V_divcb			VNET_INET(divcb)
 #define	V_divcbinfo		VNET_INET(divcbinfo)

==== //depot/projects/vimage/src/sys/netinet6/in6_proto.c#31 (text+ko) ====

@@ -379,20 +379,18 @@
 int	ip6_hdrnestlimit;	/* How many header options will we process? */
 int	ip6_dad_count;		/* DupAddrDetectionTransmits */
 int	ip6_auto_flowlabel;
-int     ip6_gif_hlim = 0;
+int	ip6_gif_hlim;
 int	ip6_use_deprecated;	/* allow deprecated addr (RFC2462 5.5.4) */
-int	ip6_rr_prune;		/* router renumbering prefix
-				 * walk list every 5 sec. */
+int	ip6_rr_prune;		/* router renumbering prefix */
 int	ip6_mcast_pmtu;		/* enable pMTU discovery for multicast? */
 int	ip6_v6only;
-
 int	ip6_keepfaith;
 time_t	ip6_log_time;
+int	nd6_onlink_ns_rfc4861;	/* allow 'on-link' nd6 NS (as in RFC 4861) */
 #ifdef IPSTEALTH
 int	ip6stealth;
 #endif
 #endif /* !VIMAGE */
-int	nd6_onlink_ns_rfc4861 = 0; /* allow 'on-link' nd6 NS (as in RFC 4861) */
 
 /* icmp6 */
 /*
@@ -577,9 +575,8 @@
 	nd6_maxnudhint, CTLFLAG_RW,	nd6_maxnudhint, 0, "");
 SYSCTL_V_INT(V_NET, vnet_inet6, _net_inet6_icmp6, ICMPV6CTL_ND6_DEBUG,
 	nd6_debug, CTLFLAG_RW,	nd6_debug,		0, "");
-
-SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_ONLINKNSRFC4861,
-	nd6_onlink_ns_rfc4861, CTLFLAG_RW, &nd6_onlink_ns_rfc4861, 0,
+SYSCTL_V_INT(V_NET, vnet_inet6, _net_inet6_icmp6, ICMPV6CTL_ND6_ONLINKNSRFC4861,
+	nd6_onlink_ns_rfc4861, CTLFLAG_RW, nd6_onlink_ns_rfc4861, 0,
 	"Accept 'on-link' nd6 NS in compliance with RFC 4861.");
 
 static void
@@ -602,6 +599,7 @@
 	V_ip6_v6only = 1;
 	V_ip6_keepfaith = 0;
 	V_ip6_log_time = (time_t)0L;
+	V_nd6_onlink_ns_rfc4861 = 0;
 #ifdef IPSTEALTH
 	V_ip6stealth = 0;
 #endif

==== //depot/projects/vimage/src/sys/netinet6/nd6.h#9 (text+ko) ====

@@ -340,17 +340,8 @@
 extern struct nd_drhead nd_defrouter;
 extern struct nd_prhead nd_prefix;
 extern int nd6_debug;
-#endif
 extern int nd6_onlink_ns_rfc4861;
-
-#define nd6log(x)	do { if (V_nd6_debug) log x; } while (/*CONSTCOND*/ 0)
-
-#ifndef VIMAGE
 extern struct callout nd6_timer_ch;
-#endif
-
-/* nd6_rtr.c */
-#ifndef VIMAGE
 extern int nd6_defifindex;
 extern int ip6_desync_factor;	/* seconds */
 extern u_int32_t ip6_temp_preferred_lifetime; /* seconds */
@@ -358,6 +349,8 @@
 extern int ip6_temp_regen_advance; /* seconds */
 #endif
 
+#define nd6log(x)	do { if (V_nd6_debug) log x; } while (/*CONSTCOND*/ 0)
+
 union nd_opts {
 	struct nd_opt_hdr *nd_opt_array[8];	/* max = target address list */
 	struct {

==== //depot/projects/vimage/src/sys/netinet6/nd6_nbr.c#24 (text+ko) ====

@@ -153,7 +153,7 @@
 			    "(wrong ip6 dst)\n"));
 			goto bad;
 		}
-	} else if (!nd6_onlink_ns_rfc4861) {
+	} else if (!V_nd6_onlink_ns_rfc4861) {
 		struct sockaddr_in6 src_sa6;
 
 		/*

==== //depot/projects/vimage/src/sys/netinet6/vinet6.h#23 (text+ko) ====

@@ -74,6 +74,7 @@
 	struct callout 			_in6_tmpaddrtimer_ch;
 	int				_nd6_inuse;
 	int				_nd6_allocated;
+	int				_nd6_onlink_ns_rfc4861;
 	struct llinfo_nd6		_llinfo_nd6;
 	struct nd_drhead		_nd_defrouter;
 	struct nd_prhead 		_nd_prefix;
@@ -212,6 +213,7 @@
 #define	V_nd6_maxnudhint		VNET_INET6(nd6_maxnudhint)
 #define	V_nd6_maxqueuelen		VNET_INET6(nd6_maxqueuelen)
 #define	V_nd6_mmaxtries			VNET_INET6(nd6_mmaxtries)
+#define	V_nd6_onlink_ns_rfc4861		VNET_INET6(nd6_onlink_ns_rfc4861)
 #define	V_nd6_prune			VNET_INET6(nd6_prune)
 #define	V_nd6_recalc_reachtm_interval	VNET_INET6(nd6_recalc_reachtm_interval)
 #define	V_nd6_slowtimo_ch		VNET_INET6(nd6_slowtimo_ch)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810171328.m9HDS2aF039954>