From owner-svn-src-head@FreeBSD.ORG Tue Oct 23 16:54:57 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1176751; Tue, 23 Oct 2012 16:54:57 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id D4E458FC0C; Tue, 23 Oct 2012 16:54:56 +0000 (UTC) Received: from [192.168.1.103] (p508F9AE1.dip.t-dialin.net [80.143.154.225]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 46E3A1C0C0692; Tue, 23 Oct 2012 18:54:54 +0200 (CEST) Subject: Re: svn commit: r241916 - in head/sys: netinet netinet6 Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Michael Tuexen In-Reply-To: <20121023142219.K1008@besplex.bde.org> Date: Tue, 23 Oct 2012 18:54:53 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201210222149.q9MLnvrt014543@svn.freebsd.org> <20121023142219.K1008@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1283) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 16:54:58 -0000 On Oct 23, 2012, at 6:23 AM, Bruce Evans wrote: > On Mon, 22 Oct 2012, Xin LI wrote: >=20 >> Log: >> Remove __P. >=20 > This was a chance to remove style bugs in the prototypes. At least it > didn't create so many new ones, unlike the original __P axing. It > still enlarged about a hundred by changing from Gnu style continuation > to Gnu style continuation indentation with an off-by-5 error. Hi Bruce, please note that the SCTP code in the FreeBSD sources is generated via an export script from a codebase which runs on multiple platforms. The script tries to follow FreeBSDs guidelines, but is far from being perfect. Best regards Michael >=20 >> Modified: head/sys/netinet/sctp_uio.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet/sctp_uio.h Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet/sctp_uio.h Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -1267,44 +1267,44 @@ sctp_sorecvmsg(struct socket *so, >> #if !(defined(_KERNEL)) && !(defined(__Userspace__)) >>=20 >> __BEGIN_DECLS >> -int sctp_peeloff __P((int, sctp_assoc_t)); >> -int sctp_bindx __P((int, struct sockaddr *, int, int)); >> -int sctp_connectx __P((int, const struct sockaddr *, int, = sctp_assoc_t *)); >> -int sctp_getaddrlen __P((sa_family_t)); >> -int sctp_getpaddrs __P((int, sctp_assoc_t, struct sockaddr **)); >> -void sctp_freepaddrs __P((struct sockaddr *)); >> -int sctp_getladdrs __P((int, sctp_assoc_t, struct sockaddr **)); >> -void sctp_freeladdrs __P((struct sockaddr *)); >> -int sctp_opt_info __P((int, sctp_assoc_t, int, void *, socklen_t = *)); >> +int sctp_peeloff(int, sctp_assoc_t); >> +int sctp_bindx(int, struct sockaddr *, int, int); >> +int sctp_connectx(int, const struct sockaddr *, int, sctp_assoc_t = *); >> +int sctp_getaddrlen(sa_family_t); >> +int sctp_getpaddrs(int, sctp_assoc_t, struct sockaddr **); >> +void sctp_freepaddrs(struct sockaddr *); >> +int sctp_getladdrs(int, sctp_assoc_t, struct sockaddr **); >> +void sctp_freeladdrs(struct sockaddr *); >> +int sctp_opt_info(int, sctp_assoc_t, int, void *, socklen_t *); >=20 > sctp is fairly consistent in having style bugs on every line. It > never indented fucntion names in prototypes. >=20 >>=20 >> /* deprecated */ >> ssize_t sctp_sendmsg >> -__P((int, const void *, size_t, const struct sockaddr *, >> - socklen_t, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t)); >> +(int, const void *, size_t, const struct sockaddr *, >> + socklen_t, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t); >=20 > Putting the __P(( unindented on a new line was weird. It is weirder > now with the __P( part. >=20 >>=20 >> /* deprecated */ >> - ssize_t sctp_send __P((int, const void *, size_t, >> - const struct sctp_sndrcvinfo *, int)); >> + ssize_t sctp_send(int, const void *, size_t, >> + const struct sctp_sndrcvinfo *, int); >=20 > Continuation lines were weirdly indented in at least this part of = sctp. > This one uses 14 spaces, underneath a line with 1 tab. 1 tab followed > by 4 spaces would be normal. Since the 14 spaces didn't line up with > anything, removing __P( leaves the continuation line not lined up with > anything slightly differently. >=20 >> ... >> /* deprecated */ >> - ssize_t sctp_recvmsg __P((int, void *, size_t, struct sockaddr = *, socklen_t *, >> - struct sctp_sndrcvinfo *, int *)); >> + ssize_t sctp_recvmsg(int, void *, size_t, struct sockaddr *, = socklen_t *, >> + struct sctp_sndrcvinfo *, int *); >=20 > Here there are 17 spaces instead of 14. >=20 >> Modified: head/sys/netinet6/icmp6.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet6/icmp6.c Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet6/icmp6.c Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -133,15 +133,15 @@ VNET_DECLARE(int, icmp6_nodeinfo); >> static void icmp6_errcount(struct icmp6errstat *, int, int); >> static int icmp6_rip6_input(struct mbuf **, int); >> static int icmp6_ratelimit(const struct in6_addr *, const int, const = int); >> -static const char *icmp6_redirect_diag __P((struct in6_addr *, >> - struct in6_addr *, struct in6_addr *)); >> +static const char *icmp6_redirect_diag(struct in6_addr *, >> + struct in6_addr *, struct in6_addr *); >=20 > Function names not indented. >=20 > Continuation lines indented abnormally with 1 tab so that it doesn't > line up with anything. >=20 >> static struct mbuf *ni6_input(struct mbuf *, int); >> static struct mbuf *ni6_nametodns(const char *, int, int); >> static int ni6_dnsmatch(const char *, int, const char *, int); >> -static int ni6_addrs __P((struct icmp6_nodeinfo *, struct mbuf *, >> - struct ifnet **, struct in6_addr *)); >> -static int ni6_store_addrs __P((struct icmp6_nodeinfo *, struct = icmp6_nodeinfo *, >> - struct ifnet *, int)); >=20 > Here the continuation lines were indented abnormally but using Gnu = style > (indent -lp) so that they lined up with the parantheses using a = mixture > of tabs and spaces. >=20 >> +static int ni6_addrs(struct icmp6_nodeinfo *, struct mbuf *, >> + struct ifnet **, struct in6_addr *); >> +static int ni6_store_addrs(struct icmp6_nodeinfo *, struct = icmp6_nodeinfo *, >> + struct ifnet *, int); >=20 > Now after removing __P( and closing up a space, the contination lines = don't > even follow Gnu style, but are off by 5 spaces. >=20 >> static int icmp6_notify_error(struct mbuf **, int, int, int); >>=20 >> /* >>=20 >> Modified: head/sys/netinet6/in6.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet6/in6.c Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet6/in6.c Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -129,10 +129,10 @@ const struct in6_addr in6mask128 =3D IN6MA >> const struct sockaddr_in6 sa6_any =3D >> { sizeof(sa6_any), AF_INET6, 0, 0, IN6ADDR_ANY_INIT, 0 }; >>=20 >> -static int in6_lifaddr_ioctl __P((struct socket *, u_long, caddr_t, >> - struct ifnet *, struct thread *)); >> -static int in6_ifinit __P((struct ifnet *, struct in6_ifaddr *, >> - struct sockaddr_in6 *, int)); >> +static int in6_lifaddr_ioctl(struct socket *, u_long, caddr_t, >> + struct ifnet *, struct thread *); >> +static int in6_ifinit(struct ifnet *, struct in6_ifaddr *, >> + struct sockaddr_in6 *, int); >> static void in6_unlink_ifa(struct in6_ifaddr *, struct ifnet *); >>=20 >> int (*faithprefix_p)(struct in6_addr *); >=20 > netinet6 mostly had the first type of misindentation of continued = lines, > so removing __P( doesn't increase the style bugs. >=20 >> Modified: head/sys/netinet6/in6.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet6/in6.h Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet6/in6.h Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -635,22 +635,22 @@ struct cmsghdr; >> struct ip6_hdr; >>=20 >> int in6_cksum_pseudo(struct ip6_hdr *, uint32_t, uint8_t, uint16_t); >> -int in6_cksum __P((struct mbuf *, u_int8_t, u_int32_t, u_int32_t)); >> -int in6_localaddr __P((struct in6_addr *)); >> +int in6_cksum(struct mbuf *, u_int8_t, u_int32_t, u_int32_t); >> +int in6_localaddr(struct in6_addr *); >> int in6_localip(struct in6_addr *); >=20 > netinet actually had normal style here, except for __P( and a weird = mixture > of uintN_t with u_intN_t. >=20 >> -int in6_addrscope __P((struct in6_addr *)); >> -struct in6_ifaddr *in6_ifawithifp __P((struct ifnet *, struct = in6_addr *)); >> -extern void in6_if_up __P((struct ifnet *)); >> +int in6_addrscope(struct in6_addr *); >> +struct in6_ifaddr *in6_ifawithifp(struct ifnet *, struct = in6_addr *); >> +extern void in6_if_up(struct ifnet *); >=20 > 'extern' on prototypes is even more archaic than __P(()), and is a = style > bug. It may have been needed for portability in 1980. >=20 >> struct sockaddr; >=20 > Mispaced declaration: > (1) it is in the middle of the prototypes but not attached to the one = (?) > prototype that uses it. For other declarations, this file uses the > more normal style of forward-incompete-declaring structs in a = subsection > before all the prototypes. > (2) a subsection is not started or ended for it. >=20 >> extern u_char ip6_protox[]; >>=20 >=20 > Misplaced declaration: > (1) it is a data declaration in the middle of the prototypes but not = even > used by the prototypes. > (2) a subsection is ended for it but not started. >=20 >> -void in6_sin6_2_sin __P((struct sockaddr_in *sin, >> - struct sockaddr_in6 *sin6)); >> -void in6_sin_2_v4mapsin6 __P((struct sockaddr_in *sin, >> - struct sockaddr_in6 *sin6)); >=20 > These used to line up. >=20 >> -void in6_sin6_2_sin_in_sock __P((struct sockaddr *nam)); >> -void in6_sin_2_v4mapsin6_in_sock __P((struct sockaddr = **nam)); >=20 >> -extern void addrsel_policy_init __P((void)); >=20 > Another extern, with no indentation. >=20 >> +void in6_sin6_2_sin(struct sockaddr_in *sin, >> + struct sockaddr_in6 *sin6); >> +void in6_sin_2_v4mapsin6(struct sockaddr_in *sin, >> + struct sockaddr_in6 *sin6); >=20 > Now off 5 spaces. The misindentation is more visible in the diffs = than > above because both lines use tabs normally. >=20 >> +void in6_sin6_2_sin_in_sock(struct sockaddr *nam); >> +void in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam); >> +extern void addrsel_policy_init(void); >=20 > It still has the extern. >=20 >>=20 >> #define satosin6(sa) ((struct sockaddr_in6 *)(sa)) >> #define sin6tosa(sin6) ((struct sockaddr *)(sin6)) >> @@ -674,43 +674,43 @@ typedef __socklen_t socklen_t; >> __BEGIN_DECLS >> struct cmsghdr; >>=20 >> -extern int inet6_option_space __P((int)); >> -extern int inet6_option_init __P((void *, struct cmsghdr **, int)); >> -extern int inet6_option_append __P((struct cmsghdr *, const uint8_t = *, >> - int, int)); >> -extern uint8_t *inet6_option_alloc __P((struct cmsghdr *, int, int, = int)); >> -extern int inet6_option_next __P((const struct cmsghdr *, uint8_t = **)); >> -extern int inet6_option_find __P((const struct cmsghdr *, uint8_t = **, int)); >> - >> -extern size_t inet6_rthdr_space __P((int, int)); >> -extern struct cmsghdr *inet6_rthdr_init __P((void *, int)); >> -extern int inet6_rthdr_add __P((struct cmsghdr *, const struct = in6_addr *, >> - unsigned int)); >> -extern int inet6_rthdr_lasthop __P((struct cmsghdr *, unsigned = int)); >> +extern int inet6_option_space(int); >> +extern int inet6_option_init(void *, struct cmsghdr **, int); >> +extern int inet6_option_append(struct cmsghdr *, const uint8_t *, >> + int, int); >> +extern uint8_t *inet6_option_alloc(struct cmsghdr *, int, int, int); >> +extern int inet6_option_next(const struct cmsghdr *, uint8_t **); >> +extern int inet6_option_find(const struct cmsghdr *, uint8_t **, = int); >> + >> +extern size_t inet6_rthdr_space(int, int); >> +extern struct cmsghdr *inet6_rthdr_init(void *, int); >> +extern int inet6_rthdr_add(struct cmsghdr *, const struct in6_addr = *, >> + unsigned int); >> +extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int); >> #if 0 /* not implemented yet */ >> -extern int inet6_rthdr_reverse __P((const struct cmsghdr *, struct = cmsghdr *)); >> +extern int inet6_rthdr_reverse(const struct cmsghdr *, struct = cmsghdr *); >> #endif >> -extern int inet6_rthdr_segments __P((const struct cmsghdr *)); >> -extern struct in6_addr *inet6_rthdr_getaddr __P((struct cmsghdr *, = int)); >> -extern int inet6_rthdr_getflags __P((const struct cmsghdr *, int)); >> - >> -extern int inet6_opt_init __P((void *, socklen_t)); >> -extern int inet6_opt_append __P((void *, socklen_t, int, uint8_t, = socklen_t, >> - uint8_t, void **)); >> -extern int inet6_opt_finish __P((void *, socklen_t, int)); >> -extern int inet6_opt_set_val __P((void *, int, void *, socklen_t)); >> - >> -extern int inet6_opt_next __P((void *, socklen_t, int, uint8_t *, = socklen_t *, >> - void **)); >> -extern int inet6_opt_find __P((void *, socklen_t, int, uint8_t, = socklen_t *, >> - void **)); >> -extern int inet6_opt_get_val __P((void *, int, void *, socklen_t)); >> -extern socklen_t inet6_rth_space __P((int, int)); >> -extern void *inet6_rth_init __P((void *, socklen_t, int, int)); >> -extern int inet6_rth_add __P((void *, const struct in6_addr *)); >> -extern int inet6_rth_reverse __P((const void *, void *)); >> -extern int inet6_rth_segments __P((const void *)); >> -extern struct in6_addr *inet6_rth_getaddr __P((const void *, int)); >> +extern int inet6_rthdr_segments(const struct cmsghdr *); >> +extern struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int); >> +extern int inet6_rthdr_getflags(const struct cmsghdr *, int); >> + >> +extern int inet6_opt_init(void *, socklen_t); >> +extern int inet6_opt_append(void *, socklen_t, int, uint8_t, = socklen_t, >> + uint8_t, void **); >> +extern int inet6_opt_finish(void *, socklen_t, int); >> +extern int inet6_opt_set_val(void *, int, void *, socklen_t); >> + >> +extern int inet6_opt_next(void *, socklen_t, int, uint8_t *, = socklen_t *, >> + void **); >> +extern int inet6_opt_find(void *, socklen_t, int, uint8_t, socklen_t = *, >> + void **); >> +extern int inet6_opt_get_val(void *, int, void *, socklen_t); >> +extern socklen_t inet6_rth_space(int, int); >> +extern void *inet6_rth_init(void *, socklen_t, int, int); >> +extern int inet6_rth_add(void *, const struct in6_addr *); >> +extern int inet6_rth_reverse(const void *, void *); >> +extern int inet6_rth_segments(const void *); >> +extern struct in6_addr *inet6_rth_getaddr(const void *, int); >> __END_DECLS >=20 > Squillions of externs, and no tabs except to consistently misindent > continuation lines, so removing __P( didn't make the indentation = worse. >=20 > This apparently uses extern because userland is more likely than the > kernel to be compiled by a 1980 model compiler. But the 1980 model > won't have dreamed of prototypes, so removing __P(()) breaks the > sources for it completely, and the externs are useless. >=20 >>=20 >> #endif /* __BSD_VISIBLE */ >>=20 >> Modified: head/sys/netinet6/in6_gif.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet6/in6_gif.h Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet6/in6_gif.h Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -36,10 +36,10 @@ >> #define GIF_HLIM 30 >>=20 >> struct gif_softc; >> -int in6_gif_input __P((struct mbuf **, int *, int)); >> -int in6_gif_output __P((struct ifnet *, int, struct mbuf *)); >> -int gif_encapcheck6 __P((const struct mbuf *, int, int, void *)); >> -int in6_gif_attach __P((struct gif_softc *)); >> -int in6_gif_detach __P((struct gif_softc *)); >> +int in6_gif_input(struct mbuf **, int *, int); >> +int in6_gif_output(struct ifnet *, int, struct mbuf *); >> +int gif_encapcheck6(const struct mbuf *, int, int, void *); >> +int in6_gif_attach(struct gif_softc *); >> +int in6_gif_detach(struct gif_softc *); >=20 > Another place for forward incomplete struct declarations. >=20 > These prototypes remain misindented and unsorted. >=20 > The gif_encapcheck6() one seems to be in a wrong namespace and is = unsorted > into the middle of the in6 ones. If it were named in6_gig_enc..., = then it > would still be unsorted. >=20 >>=20 >> #endif /* _NETINET6_IN6_GIF_H_ */ >>=20 >=20 > Backwards comment. >=20 > [... Lots more similarly] >=20 >> Modified: head/sys/netinet6/in6_pcb.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet6/in6_pcb.h Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet6/in6_pcb.h Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -72,53 +72,53 @@ >> struct inpcbgroup * >> in6_pcbgroup_byhash(struct inpcbinfo *, u_int, uint32_t); >> struct inpcbgroup * >> - in6_pcbgroup_byinpcb __P((struct inpcb *)); >> + in6_pcbgroup_byinpcb(struct inpcb *); >> struct inpcbgroup * >> in6_pcbgroup_bymbuf(struct inpcbinfo *, struct mbuf *); >> struct inpcbgroup * >> - in6_pcbgroup_bytuple __P((struct inpcbinfo *, const struct = in6_addr *, >> - u_short, const struct in6_addr *, u_short)); >> + in6_pcbgroup_bytuple(struct inpcbinfo *, const struct in6_addr = *, >> + u_short, const struct in6_addr *, u_short); >=20 > Normal style to a fault. It even has the tab after 'struct' to = bogusly > line up the struct tag. FreeBSD stopped requiring this mistake 10-15 > years ago. I don't remember if it is still accepted. >=20 > With normal style, removing __P( doesn't affect the continued line. >=20 > This still uses u_short instead of u_int16_t or uint16_t. >=20 >> ... >> struct inpcb * >> - in6_pcblookup_local __P((struct inpcbinfo *, >> + in6_pcblookup_local(struct inpcbinfo *, >> struct in6_addr *, u_short, int, >> - struct ucred *)); >> + struct ucred *); >=20 > Back to abnormal indentation for the continued lines.o > Removing __P( breaks it further, as usual. >=20 > The abnormal indentation is also partly responsible for needing 2 > continuation lines instead of 1. But there was space for more args > before splitting, and after removal of __P( there is even more space. > Complete editing of __P( would create larger chur^diffs by often > moving 1 arg from each line back to the previous line in multi-line > prototypes after removing __P( gives enough space for 1 more arg on > the first line. >=20 >> struct inpcb * >> - in6_pcblookup __P((struct inpcbinfo *, struct in6_addr *, >> + in6_pcblookup(struct inpcbinfo *, struct in6_addr *, >> u_int, struct in6_addr *, u_int, int, >> - struct ifnet *)); >> + struct ifnet *); >> struct inpcb * >> - in6_pcblookup_hash_locked __P((struct inpcbinfo *, struct = in6_addr *, >> + in6_pcblookup_hash_locked(struct inpcbinfo *, struct in6_addr *, >> u_int, struct in6_addr *, u_int, int, >> - struct ifnet *)); >> + struct ifnet *); >> struct inpcb * >> - in6_pcblookup_mbuf __P((struct inpcbinfo *, struct in6_addr *, >> + in6_pcblookup_mbuf(struct inpcbinfo *, struct in6_addr *, >> u_int, struct in6_addr *, u_int, int, >> - struct ifnet *ifp, struct mbuf *)); >> -void in6_pcbnotify __P((struct inpcbinfo *, struct sockaddr = *, >> + struct ifnet *ifp, struct mbuf *); >> +void in6_pcbnotify(struct inpcbinfo *, struct sockaddr *, >> u_int, const struct sockaddr *, u_int, int, = void *, >> - struct inpcb *(*)(struct inpcb *, int))); >> + struct inpcb *(*)(struct inpcb *, int)); >=20 > Lots more off-by-5 errors. >=20 >> struct inpcb * >> - in6_rtchange __P((struct inpcb *, int)); >> + in6_rtchange(struct inpcb *, int); >=20 > After this point, most of the parameters have names, but before it = they > don't. >=20 >> struct sockaddr * >> - in6_sockaddr __P((in_port_t port, struct in6_addr *addr_p)); >> + in6_sockaddr(in_port_t port, struct in6_addr *addr_p); >> struct sockaddr * >> - in6_v4mapsin6_sockaddr __P((in_port_t port, struct in_addr = *addr_p)); >> -int in6_getpeeraddr __P((struct socket *so, struct sockaddr **nam)); >> -int in6_getsockaddr __P((struct socket *so, struct sockaddr **nam)); >> -int in6_mapped_sockaddr __P((struct socket *so, struct sockaddr = **nam)); >> -int in6_mapped_peeraddr __P((struct socket *so, struct sockaddr = **nam)); >> -int in6_selecthlim __P((struct in6pcb *, struct ifnet *)); >> -int in6_pcbsetport __P((struct in6_addr *, struct inpcb *, struct = ucred *)); >=20 > Back to no names on parameters. >=20 >> -void init_sin6 __P((struct sockaddr_in6 *sin6, struct mbuf = *m)); >=20 > Especially large unsorting and/or namespace error. >=20 >> + in6_v4mapsin6_sockaddr(in_port_t port, struct in_addr *addr_p); >> +int in6_getpeeraddr(struct socket *so, struct sockaddr **nam); >> +int in6_getsockaddr(struct socket *so, struct sockaddr **nam); >> +int in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam); >> +int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam); >> +int in6_selecthlim(struct in6pcb *, struct ifnet *); >> +int in6_pcbsetport(struct in6_addr *, struct inpcb *, struct ucred = *); >> +void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m); >=20 > The order seems to have been originally alphabetical with random > accretions. >=20 >> #endif /* _KERNEL */ >>=20 >> #endif /* !_NETINET6_IN6_PCB_H_ */ >=20 > At least this comment isn't backwards. >=20 >> ... >> Modified: head/sys/netinet6/in6_var.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet6/in6_var.h Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet6/in6_var.h Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -762,36 +762,36 @@ int in6_leavegroup(struct in6_multi_mshi >> ... >> +int in6_prefix_ioctl(struct socket *, u_long, caddr_t, >> + struct ifnet *); >=20 > After removing __P(, the line splitting is no longer needed. >=20 > [... Lots more similarly] >=20 > Bruce >=20