Skip to content

Commit

Permalink
sctp: make use of SCTP_TRUNC4 macro
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
marceloleitner authored and davem330 committed Sep 22, 2016
1 parent e2f036a commit 4a225ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/sctp/chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,10 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,
/* This is the biggest possible DATA chunk that can fit into
* the packet
*/
max_data = (asoc->pathmtu -
sctp_sk(asoc->base.sk)->pf->af->net_header_len -
sizeof(struct sctphdr) - sizeof(struct sctp_data_chunk)) & ~3;
max_data = asoc->pathmtu -
sctp_sk(asoc->base.sk)->pf->af->net_header_len -
sizeof(struct sctphdr) - sizeof(struct sctp_data_chunk);
max_data = SCTP_TRUNC4(max_data);

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

0 comments on commit 4a225ce

Please sign in to comment.