summaryrefslogtreecommitdiff
path: root/src/lib/crc/crc16.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2026-04-29 22:23:09 +0200
committerSander Vrijders <sander@ouroboros.rocks>2026-05-06 09:05:08 +0200
commit146ba945e23c2266d5e31035135b5d158d1256e8 (patch)
tree02b93c9cfb5a1528a8efd79255c4940eb09c8655 /src/lib/crc/crc16.c
parent4cfc607ebbff840991d893a8c0fa3a004caeb416 (diff)
downloadouroboros-146ba945e23c2266d5e31035135b5d158d1256e8.tar.gz
ouroboros-146ba945e23c2266d5e31035135b5d158d1256e8.zip
lib: Fix and clean up crc implementation
Fixes detection of PMULL on aarch64 without crypto extensions. Adds a crc64_nvme_step helper function in CRC64 to avoid code duplication and cleans up the comments. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib/crc/crc16.c')
-rw-r--r--src/lib/crc/crc16.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/crc/crc16.c b/src/lib/crc/crc16.c
index 55af8647..9dc59429 100644
--- a/src/lib/crc/crc16.c
+++ b/src/lib/crc/crc16.c
@@ -34,10 +34,7 @@
#include <ouroboros/crc16.h>
-/* Bit-by-bit MSB-first CRC. Header-check use case rarely exceeds a
- * few hundred bytes; a 256-entry uint16_t table costs 512 B of
- * .rodata and is easy to add later if profiling demands it.
- */
+/* Bit-by-bit MSB-first CRC. */
void crc16_ccitt_false(uint16_t * crc,
const void * buf,
size_t len)