diff options
Diffstat (limited to 'lib/avb/libavb/avb_crc32.c')
-rw-r--r-- | lib/avb/libavb/avb_crc32.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/avb/libavb/avb_crc32.c b/lib/avb/libavb/avb_crc32.c index a6b806d..55971af 100644 --- a/lib/avb/libavb/avb_crc32.c +++ b/lib/avb/libavb/avb_crc32.c @@ -98,16 +98,15 @@ static uint32_t crc32_tab[] = { * in sys/libkern.h, where it can be inlined. */ -static uint32_t _crc32(uint32_t crc_in, const uint8_t* buf, int size) { +static uint32_t crc32(uint32_t crc_in, const uint8_t* buf, int size) { const uint8_t* p = buf; uint32_t crc; crc = crc_in ^ ~0U; - while (size--) - crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8); + while (size--) crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8); return crc ^ ~0U; } uint32_t avb_crc32(const uint8_t* buf, size_t size) { - return _crc32(0, buf, size); + return crc32(0, buf, size); } |