diff options
| author | Michael Tuexen <tuexen@FreeBSD.org> | 2016-12-26 11:06:41 +0000 |
|---|---|---|
| committer | Michael Tuexen <tuexen@FreeBSD.org> | 2016-12-26 11:06:41 +0000 |
| commit | b7b84c0e02d4be385b744b6061c63e7c0cccc4be (patch) | |
| tree | 3506fdaa0bd8451f43f8016edc4ce6a4a8bd03b4 /sys/netinet/sctp_crc32.c | |
| parent | a11bac7379aa0b0ca4f1c0c85f0cc68c0fe2b126 (diff) | |
Notes
Diffstat (limited to 'sys/netinet/sctp_crc32.c')
| -rw-r--r-- | sys/netinet/sctp_crc32.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/sctp_crc32.c b/sys/netinet/sctp_crc32.c index 58abce23c7f4..93d26ea3585d 100644 --- a/sys/netinet/sctp_crc32.c +++ b/sys/netinet/sctp_crc32.c @@ -90,7 +90,7 @@ sctp_calculate_cksum(struct mbuf *m, uint32_t offset) at = m; /* find the correct mbuf and offset into mbuf */ - while ((at != NULL) && (offset > (uint32_t) SCTP_BUF_LEN(at))) { + while ((at != NULL) && (offset > (uint32_t)SCTP_BUF_LEN(at))) { offset -= SCTP_BUF_LEN(at); /* update remaining offset * left */ at = SCTP_BUF_NEXT(at); @@ -103,7 +103,7 @@ sctp_calculate_cksum(struct mbuf *m, uint32_t offset) } if (offset) { /* we only offset once into the first mbuf */ - if (offset < (uint32_t) SCTP_BUF_LEN(at)) + if (offset < (uint32_t)SCTP_BUF_LEN(at)) offset = 0; else offset -= SCTP_BUF_LEN(at); @@ -131,9 +131,9 @@ sctp_delayed_cksum(struct mbuf *m, uint32_t offset) SCTP_STAT_INCR(sctps_sendswcrc); offset += offsetof(struct sctphdr, checksum); - if (offset + sizeof(uint32_t) > (uint32_t) (m->m_len)) { + if (offset + sizeof(uint32_t) > (uint32_t)(m->m_len)) { SCTP_PRINTF("sctp_delayed_cksum(): m->len: %d, off: %d.\n", - (uint32_t) m->m_len, offset); + (uint32_t)m->m_len, offset); /* * XXX this shouldn't happen, but if it does, the correct * behavior may be to insert the checksum in the appropriate @@ -141,6 +141,6 @@ sctp_delayed_cksum(struct mbuf *m, uint32_t offset) */ return; } - *(uint32_t *) (m->m_data + offset) = checksum; + *(uint32_t *)(m->m_data + offset) = checksum; #endif } |
