Skip to content

Commit 4a225ce

Browse files
marceloleitnerdavem330
authored andcommitted
sctp: make use of SCTP_TRUNC4 macro
And avoid the usage of '&~3'. This is the last place still not using the macro. Also break the line to make it easier to read. Signed-off-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e2f036a commit 4a225ce

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

net/sctp/chunk.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,10 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,
195195
/* This is the biggest possible DATA chunk that can fit into
196196
* the packet
197197
*/
198-
max_data = (asoc->pathmtu -
199-
sctp_sk(asoc->base.sk)->pf->af->net_header_len -
200-
sizeof(struct sctphdr) - sizeof(struct sctp_data_chunk)) & ~3;
198+
max_data = asoc->pathmtu -
199+
sctp_sk(asoc->base.sk)->pf->af->net_header_len -
200+
sizeof(struct sctphdr) - sizeof(struct sctp_data_chunk);
201+
max_data = SCTP_TRUNC4(max_data);
201202

202203
max = asoc->frag_point;
203204
/* If the the peer requested that we authenticate DATA chunks

0 commit comments

Comments
 (0)