aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2024-04-10 21:56:33 +0300
committerLasse Collin <lasse.collin@tukaani.org>2024-04-10 23:12:11 +0300
commit2337f7021c860b026e3e849e60a9ae8d09ec0ea0 (patch)
tree870b58a0bae1c084949fd94aeaaabc1238fd88dc /src
parentliblzma: ARM64 CRC32: Tweak coding style and comments (diff)
downloadxz-2337f7021c860b026e3e849e60a9ae8d09ec0ea0.tar.xz
liblzma: ARM64 CRC32: Use negation instead of subtracting from 8
Subtracting from 0 is negation, this just keeps warnings away. Fixes: 761f5b69a4c778c8bcb09279b845b07c28790575
Diffstat (limited to 'src')
-rw-r--r--src/liblzma/check/crc32_arm64.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblzma/check/crc32_arm64.h b/src/liblzma/check/crc32_arm64.h
index f9a43155..cd1b355f 100644
--- a/src/liblzma/check/crc32_arm64.h
+++ b/src/liblzma/check/crc32_arm64.h
@@ -51,7 +51,7 @@ crc32_arch_optimized(const uint8_t *buf, size_t size, uint32_t crc)
// Align the input buffer because this was shown to be
// significantly faster than unaligned accesses.
- const size_t align_amount = my_min(size, (8 - (uintptr_t)buf) & 7);
+ const size_t align_amount = my_min(size, (0U - (uintptr_t)buf) & 7);
for (const uint8_t *limit = buf + align_amount; buf < limit; ++buf)
crc = __crc32b(crc, *buf);