Re: svn commit: r241916 - in head/sys: netinet netinet6
On Tue, 2012-10-23 at 20:43:33 +0200, Michael Tuexen wrote: On Oct 23, 2012, at 8:28 PM, Bruce Evans wrote: On Tue, 23 Oct 2012, Michael Tuexen wrote: On Oct 23, 2012, at 6:23 AM, Bruce Evans wrote: On Mon, 22 Oct 2012, Xin LI wrote: Log: Remove __P. 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. 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. The export script might not like manual editing of its output. Portability might require __P(()), and then removing it cleaning requires a complicated script. Maybe I wasn't clear... * The removal of __P() needs also be done upstream. I'll handle this, not problem. I don't think we need __P on any platform. * My comment was regarding your list of formatting issues of the code. Changing the formatting would require changing the export script. If someone just changes the FreeBSD sources and these changes are not included upstream, they are lost by the next commit of rrs@ or mine. My point was: Getting rid of __P is fine and we can handle that upstream (as any other non whitespace/formatting changes needed), but changing the formatting is NOT that easy. I'm sorry about that and just wanted to let you know that there is a reason why the style 9 stuff is not followed exactly within the SCTP code. I hope this makes the situation clearer. Maybe running it through uncrustify[1] as part of the export for FreeBSD could help here? hth Uli [1] http://uncrustify.sourceforge.net/ and textproc/uncrustify ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241916 - in head/sys: netinet netinet6
On 23 Oct 2012, at 11:43, Michael Tuexen tue...@fh-muenster.de wrote: * My comment was regarding your list of formatting issues of the code. Changing the formatting would require changing the export script. If someone just changes the FreeBSD sources and these changes are not included upstream, they are lost by the next commit of rrs@ or mine. Is this why sometimes your commits include more changes than described in the commit log and/or include style changes not mentioned in the log? They are usually minimal changes that don't bother a discussion, but I always wondered why. Regards, -- Rui Paulo ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241916 - in head/sys: netinet netinet6
On Oct 23, 2012, at 6:23 AM, Bruce Evans wrote: On Mon, 22 Oct 2012, Xin LI wrote: Log: Remove __P. 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 Modified: head/sys/netinet/sctp_uio.h == --- 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__)) __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 *); sctp is fairly consistent in having style bugs on every line. It never indented fucntion names in prototypes. /* 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); Putting the __P(( unindented on a new line was weird. It is weirder now with the __P( part. /* 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); 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. ... /* 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 *); Here there are 17 spaces instead of 14. Modified: head/sys/netinet6/icmp6.c == --- head/sys/netinet6/icmp6.cMon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/icmp6.cMon 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 *); Function names not indented. Continuation lines indented abnormally with 1 tab so that it doesn't line up with anything. 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)); 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. +static int ni6_addrs(struct icmp6_nodeinfo *,
Re: svn commit: r241916 - in head/sys: netinet netinet6
On Tue, 23 Oct 2012, Michael Tuexen wrote: On Oct 23, 2012, at 6:23 AM, Bruce Evans wrote: On Mon, 22 Oct 2012, Xin LI wrote: Log: Remove __P. 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. 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. The export script might not like manual editing of its output. Portability might require __P(()), and then removing it cleaning requires a complicated script. Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241916 - in head/sys: netinet netinet6
On Oct 23, 2012, at 8:28 PM, Bruce Evans wrote: On Tue, 23 Oct 2012, Michael Tuexen wrote: On Oct 23, 2012, at 6:23 AM, Bruce Evans wrote: On Mon, 22 Oct 2012, Xin LI wrote: Log: Remove __P. 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. 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. The export script might not like manual editing of its output. Portability might require __P(()), and then removing it cleaning requires a complicated script. Maybe I wasn't clear... * The removal of __P() needs also be done upstream. I'll handle this, not problem. I don't think we need __P on any platform. * My comment was regarding your list of formatting issues of the code. Changing the formatting would require changing the export script. If someone just changes the FreeBSD sources and these changes are not included upstream, they are lost by the next commit of rrs@ or mine. My point was: Getting rid of __P is fine and we can handle that upstream (as any other non whitespace/formatting changes needed), but changing the formatting is NOT that easy. I'm sorry about that and just wanted to let you know that there is a reason why the style 9 stuff is not followed exactly within the SCTP code. I hope this makes the situation clearer. Best regards Michael Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r241916 - in head/sys: netinet netinet6
On Mon, 22 Oct 2012, Xin LI wrote: Log: Remove __P. 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. Modified: head/sys/netinet/sctp_uio.h == --- 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__)) __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 *); sctp is fairly consistent in having style bugs on every line. It never indented fucntion names in prototypes. /* 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); Putting the __P(( unindented on a new line was weird. It is weirder now with the __P( part. /* 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); 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. ... /* 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 *); Here there are 17 spaces instead of 14. Modified: head/sys/netinet6/icmp6.c == --- 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 *); Function names not indented. Continuation lines indented abnormally with 1 tab so that it doesn't line up with anything. 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)); 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. +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); Now after removing __P( and closing up a space, the contination lines don't even follow Gnu style, but are off by 5 spaces. static int icmp6_notify_error(struct mbuf **, int, int,