svn commit: r336503 - in head/sys: netinet netinet6

Alexey Dokuchaev danfe at FreeBSD.org
Thu Jul 19 19:53:03 UTC 2018


On Thu, Jul 19, 2018 at 07:33:43PM +0000, Michael Tuexen wrote:
> New Revision: 336503
> URL: https://svnweb.freebsd.org/changeset/base/336503
> 
> Log:
>   Whitespace changes due to change if ident.

Was it reviewed?  Commit log does not answer this not does it explain
why these changes are good.

> +++ head/sys/netinet/sctp.h	Thu Jul 19 19:33:42 2018	(r336503)
> @@ -419,7 +419,7 @@ struct sctp_error_unresolv_addr {
>  
>  struct sctp_error_unrecognized_chunk {
>  	struct sctp_error_cause cause;	/* code=SCTP_CAUSE_UNRECOG_CHUNK */
> -	struct sctp_chunkhdr ch;/* header from chunk in error */
> +	struct sctp_chunkhdr ch;	/* header from chunk in error */

This feems fine.

> +++ head/sys/netinet/sctp_asconf.c	Thu Jul 19 19:33:42 2018	(r336503)
>  static struct mbuf *
> -sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t *error_tlv,
> +sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * error_tlv,

This looks strange now.  In C, asterisk is usually placed by the variable.

> -		tlv = (uint8_t *)(error + 1);
> +		tlv = (uint8_t *) (error + 1);

Are we doing this now?  style(9) suggests otherwise.

> -	p_addr = (struct sctp_ipv6addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), (uint8_t *)&aparam_buf);
> +	p_addr = (struct sctp_ipv6addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), (uint8_t *) & aparam_buf);

Ouch!  This looks king of ugly now. :-/

> @@ -816,8 +821,7 @@ send_reply:
>   * does the address match? returns 0 if not, 1 if so
>   */
>  static uint32_t
> -sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr *sa)
> -{
> +sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr *sa){

This and similar cases below are just plain wrong. :-(

./danfe


More information about the svn-src-head mailing list