From owner-svn-src-all@FreeBSD.ORG Sun Jan 22 02:13:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 569B5106564A; Sun, 22 Jan 2012 02:13:20 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39D4E8FC1F; Sun, 22 Jan 2012 02:13:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0M2DKCV019212; Sun, 22 Jan 2012 02:13:20 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0M2DJgA019206; Sun, 22 Jan 2012 02:13:19 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201201220213.q0M2DJgA019206@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 22 Jan 2012 02:13:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230442 - in head/sys: netinet netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2012 02:13:20 -0000 Author: bz Date: Sun Jan 22 02:13:19 2012 New Revision: 230442 URL: http://svn.freebsd.org/changeset/base/230442 Log: Clean up some #endif comments removing from short sections. Add #endif comments to longer, also refining strange ones. Properly use #ifdef rather than #if defined() where possible. Four #if defined(PCBGROUP) occurances (netinet and netinet6) were ignored to avoid conflicts with eventually upcoming changes for RSS. Reported by: bde (most) Reviewed by: bde MFC after: 3 days Modified: head/sys/netinet/if_ether.c head/sys/netinet/in_pcb.c head/sys/netinet/ip_ipsec.c head/sys/netinet6/ip6_ipsec.c head/sys/netipsec/xform_ipip.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Sun Jan 22 01:11:06 2012 (r230441) +++ head/sys/netinet/if_ether.c Sun Jan 22 02:13:19 2012 (r230442) @@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if defined(INET) +#ifdef INET #include #endif Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sun Jan 22 01:11:06 2012 (r230441) +++ head/sys/netinet/in_pcb.c Sun Jan 22 02:13:19 2012 (r230442) @@ -196,7 +196,7 @@ SYSCTL_VNET_INT(_net_inet_ip_portrange, &VNET_NAME(ipport_randomtime), 0, "Minimum time to keep sequental port " "allocation before switching to a random one"); -#endif +#endif /* INET */ /* * in_pcb.c: manage the Protocol Control Blocks. @@ -1038,7 +1038,7 @@ in_pcbdisconnect(struct inpcb *inp) inp->inp_fport = 0; in_pcbrehash(inp); } -#endif +#endif /* INET */ /* * in_pcbdetach() is responsibe for disassociating a socket from an inpcb. @@ -1169,7 +1169,7 @@ in_pcbfree(struct inpcb *inp) #ifdef IPSEC if (inp->inp_sp != NULL) ipsec_delete_pcbpolicy(inp); -#endif /* IPSEC */ +#endif inp->inp_gencnt = ++pcbinfo->ipi_gencnt; in_pcbremlists(inp); #ifdef INET6 @@ -1586,7 +1586,7 @@ in_pcblookup_group(struct inpcbinfo *pcb if (inp->inp_vflag & INP_IPV6PROTO) local_wild_mapped = inp; else -#endif /* INET6 */ +#endif if (injail) jail_wild = inp; else @@ -1601,7 +1601,7 @@ in_pcblookup_group(struct inpcbinfo *pcb #ifdef INET6 if (inp == NULL) inp = local_wild_mapped; -#endif /* defined(INET6) */ +#endif if (inp != NULL) goto found; } /* if (lookupflags & INPLOOKUP_WILDCARD) */ @@ -1731,7 +1731,7 @@ in_pcblookup_hash_locked(struct inpcbinf if (inp->inp_vflag & INP_IPV6PROTO) local_wild_mapped = inp; else -#endif /* INET6 */ +#endif if (injail) jail_wild = inp; else @@ -1747,7 +1747,7 @@ in_pcblookup_hash_locked(struct inpcbinf #ifdef INET6 if (local_wild_mapped != NULL) return (local_wild_mapped); -#endif /* defined(INET6) */ +#endif } /* if ((lookupflags & INPLOOKUP_WILDCARD) != 0) */ return (NULL); @@ -1871,7 +1871,7 @@ in_pcbinshash_internal(struct inpcb *inp if (inp->inp_vflag & INP_IPV6) hashkey_faddr = inp->in6p_faddr.s6_addr32[3] /* XXX */; else -#endif /* INET6 */ +#endif hashkey_faddr = inp->inp_faddr.s_addr; pcbhash = &pcbinfo->ipi_hashbase[INP_PCBHASH(hashkey_faddr, @@ -1958,7 +1958,7 @@ in_pcbrehash_mbuf(struct inpcb *inp, str if (inp->inp_vflag & INP_IPV6) hashkey_faddr = inp->in6p_faddr.s6_addr32[3] /* XXX */; else -#endif /* INET6 */ +#endif hashkey_faddr = inp->inp_faddr.s_addr; head = &pcbinfo->ipi_hashbase[INP_PCBHASH(hashkey_faddr, @@ -2226,14 +2226,13 @@ db_print_inconninfo(struct in_conninfo * /* IPv6. */ ip6_sprintf(laddr_str, &inc->inc6_laddr); ip6_sprintf(faddr_str, &inc->inc6_faddr); - } else { + } else #endif + { /* IPv4. */ inet_ntoa_r(inc->inc_laddr, laddr_str); inet_ntoa_r(inc->inc_faddr, faddr_str); -#ifdef INET6 } -#endif db_print_indent(indent); db_printf("inc_laddr %s inc_lport %u\n", laddr_str, ntohs(inc->inc_lport)); @@ -2446,4 +2445,4 @@ DB_SHOW_COMMAND(inpcb, db_show_inpcb) db_print_inpcb(inp, "inpcb", 0); } -#endif +#endif /* DDB */ Modified: head/sys/netinet/ip_ipsec.c ============================================================================== --- head/sys/netinet/ip_ipsec.c Sun Jan 22 01:11:06 2012 (r230441) +++ head/sys/netinet/ip_ipsec.c Sun Jan 22 02:13:19 2012 (r230442) @@ -92,7 +92,7 @@ SYSCTL_VNET_INT(_net_inet_ipsec, OID_AUT int ip_ipsec_filtertunnel(struct mbuf *m) { -#if defined(IPSEC) +#ifdef IPSEC /* * Bypass packet filtering for packets previously handled by IPsec. Modified: head/sys/netinet6/ip6_ipsec.c ============================================================================== --- head/sys/netinet6/ip6_ipsec.c Sun Jan 22 01:11:06 2012 (r230441) +++ head/sys/netinet6/ip6_ipsec.c Sun Jan 22 02:13:19 2012 (r230442) @@ -103,7 +103,7 @@ SYSCTL_VNET_INT(_net_inet6_ipsec6, OID_A int ip6_ipsec_filtertunnel(struct mbuf *m) { -#if defined(IPSEC) +#ifdef IPSEC /* * Bypass packet filtering for packets previously handled by IPsec. Modified: head/sys/netipsec/xform_ipip.c ============================================================================== --- head/sys/netipsec/xform_ipip.c Sun Jan 22 01:11:06 2012 (r230441) +++ head/sys/netipsec/xform_ipip.c Sun Jan 22 02:13:19 2012 (r230442) @@ -687,7 +687,7 @@ static struct ip6protosw ipe6_protosw = }; #endif /* INET6 && INET */ -#if defined(INET) +#ifdef INET /* * Check the encapsulated packet to see if we want it */