lib/crc32.c: fix trivial typo in preprocessor condition
PATCH 1/1 lib/crc32.c: fix trivial typo in preprocessor condition
Whether crc32_be needs a lookup table is chosen based on CRC_LE_BITS. Obviously, the _be function should be governed by the _BE_ define.
This probably never pops up as it's hard to come up with a configuration where CRC_BE_BITS isn't the same as CRC_LE_BITS and as nobody is using bitwise CRC anyway.
<rant>
While skimming through some mailing lists, I learned that not only is this a safety critical bug[tm], it likely will also lead to a car crash unless fixed[1]. We can't let that happen, can we?
As the safety experts are now for more than one month working on a patch already, it's maybe time to save them some effort.
[1]: https://lists.elisa.tech/g/devel/message/1089
</rant>
---
Sorry for spamming people in CC:, there doesn't seem to be a designated maintainer for lib/crc*.
lib/crc32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/crc32.c +1 -1
@@ -331,7 +331,7 @@ static inline u32 __pure crc32_be_generic(u32 crc, unsigned char const *p,return crc; } -#if CRC_LE_BITS ==1 +#if CRC_BE_BITS ==1 u32 __pure crc32_be (u32 crc,unsigned char const *p,size_t len) {return crc32_be_generic (crc, p, len,NULL ,CRC32_POLY_BE );
Signature · 1 line
2.20.1