summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_crc32.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-11-04 08:45:50 +0000
committerru <ru@FreeBSD.org>2006-11-04 08:45:50 +0000
commitc5d52722022143241688ac622804e41ea6811cb5 (patch)
tree64f6114ecbc6f685a522a56eff4ffea17f7c0496 /sys/netinet/sctp_crc32.c
parent20b5c61adb4d1e99d1deb4d4b3ded80984408458 (diff)
downloadFreeBSD-src-c5d52722022143241688ac622804e41ea6811cb5.zip
FreeBSD-src-c5d52722022143241688ac622804e41ea6811cb5.tar.gz
Fix pointer arithmetic to be 64-bit friendly.
Diffstat (limited to 'sys/netinet/sctp_crc32.c')
-rw-r--r--sys/netinet/sctp_crc32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/sctp_crc32.c b/sys/netinet/sctp_crc32.c
index e84d7fd..f6fd98c 100644
--- a/sys/netinet/sctp_crc32.c
+++ b/sys/netinet/sctp_crc32.c
@@ -589,7 +589,7 @@ update_crc32(uint32_t crc32,
if (length == 0) {
return (crc32);
}
- offset = ((uint32_t) buffer - ((uint32_t) buffer & 0xfffffffc));
+ offset = (uintptr_t) buffer & 3;
return (sctp_crc32c_sb8_64_bit(crc32, buffer, length, offset));
}
OpenPOWER on IntegriCloud