Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Apr 2016 09:08:07 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Michael Tuexen <tuexen@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r298187 - head/sys/netinet
Message-ID:  <1460992087.52955.47.camel@freebsd.org>
In-Reply-To: <201604180638.u3I6cs5P043229@repo.freebsd.org>
References:  <201604180638.u3I6cs5P043229@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2016-04-18 at 06:38 +0000, Michael Tuexen wrote:
> Author: tuexen
> Date: Mon Apr 18 06:38:53 2016
> New Revision: 298187
> URL: https://svnweb.freebsd.org/changeset/base/298187
> 
> Log:
>   Don't use anonymous unions.
> 

Why not?  This is one of those commit messages that really needs to say
WHY the change is happening more than WHAT is happening.

-- Ian

> Modified:
>   head/sys/netinet/sctp_header.h
>   head/sys/netinet/sctp_indata.c
>   head/sys/netinet/sctp_output.c
> 
> Modified: head/sys/netinet/sctp_header.h
> =====================================================================
> =========
> --- head/sys/netinet/sctp_header.h	Mon Apr 18 06:32:24 2016	
> (r298186)
> +++ head/sys/netinet/sctp_header.h	Mon Apr 18 06:38:53 2016	
> (r298187)
> @@ -160,7 +160,7 @@ struct sctp_idata {
>  	union {
>  		uint32_t protocol_id;
>  		uint32_t fsn;	/* Fragment Sequence Number */
> -	};
> +	}     ppid_fsn;
>  	/* user data follows */
>  }          SCTP_PACKED;
>  
> 
> Modified: head/sys/netinet/sctp_indata.c
> =====================================================================
> =========
> --- head/sys/netinet/sctp_indata.c	Mon Apr 18 06:32:24 2016	
> (r298186)
> +++ head/sys/netinet/sctp_indata.c	Mon Apr 18 06:38:53 2016	
> (r298187)
> @@ -1558,7 +1558,7 @@ sctp_process_a_data_chunk(struct sctp_tc
>  		if (ch->ch.chunk_flags & SCTP_DATA_FIRST_FRAG)
>  			fsn = 0;
>  		else
> -			fsn = ntohl(nch->dp.fsn);
> +			fsn = ntohl(nch->dp.ppid_fsn.fsn);
>  		old_data = 0;
>  	} else {
>  		ch = (struct sctp_data_chunk *)sctp_m_getptr(*m,
> offset,
> 
> Modified: head/sys/netinet/sctp_output.c
> =====================================================================
> =========
> --- head/sys/netinet/sctp_output.c	Mon Apr 18 06:32:24 2016	
> (r298186)
> +++ head/sys/netinet/sctp_output.c	Mon Apr 18 06:38:53 2016	
> (r298187)
> @@ -7641,9 +7641,9 @@ dont_do_it:
>  		ndchkh->dp.reserved = htons(0);
>  		ndchkh->dp.msg_id = htonl(sp->msg_id);
>  		if (sp->fsn == 0)
> -			ndchkh->dp.protocol_id = chk
> ->rec.data.payloadtype;
> +			ndchkh->dp.ppid_fsn.protocol_id = chk
> ->rec.data.payloadtype;
>  		else
> -			ndchkh->dp.fsn = htonl(sp->fsn);
> +			ndchkh->dp.ppid_fsn.fsn = htonl(sp->fsn);
>  		sp->fsn++;
>  		ndchkh->ch.chunk_length = htons(chk->send_size);
>  	}
> 



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