From 9adfda2ca30f19858ca272e0ee99b3ff3ff62a93 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Fri, 1 Feb 2013 20:37:03 +0100 Subject: core/crc: Fix the 64 bits implementation We used 1ULL at one place and not the other ... at the same time, we now use (uintXX_t) so that the proper type is used each time. Signed-off-by: Sylvain Munaut --- src/crcXXgen.c.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/crcXXgen.c.tpl') diff --git a/src/crcXXgen.c.tpl b/src/crcXXgen.c.tpl index 80bf1e2a..2a4bf213 100644 --- a/src/crcXXgen.c.tpl +++ b/src/crcXXgen.c.tpl @@ -53,13 +53,13 @@ osmo_crcXXgen_compute_bits(const struct osmo_crcXXgen_code *code, for (i=0; ibits) - 1; + crc &= ((uintXX_t)1 << code->bits) - 1; } crc ^= code->remainder; -- cgit v1.2.3