Thread (5 messages) 5 messages, 3 authors, 2016-09-19

RE: [PATCH next] sctp: make use of WORD_TRUNC macro

flat view

From: David Laight <hidden>
Date: 2016-09-16 09:54:16
Also in: linux-sctp

From: Marcelo Ricardo Leitner
Sent: 15 September 2016 19:13
No functional change. Just to avoid the usage of '&~3'.
...
quoted hunk ↗ jump to hunk
-	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 = WORD_TRUNC(max_data);
Hmmm....
Am I the only person who understands immediately what & ~3 does
but would have to grovel through the headers to find exactly what
WORD_TRUNC() does.

How big is a 'WORD' anyway??

	David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help