Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
const void *end = (uint8_t*)buf + len;
while (buf != end) {
- val = crc_table [(uint8_t)val ^ *(uint8_t*)buf] ^ (val >> 8);
+ val = crc_table[(uint8_t)val ^ *(uint8_t*)buf] ^ (val >> 8);
buf = (uint8_t*)buf + 1;
}
return val;
return (gpt_partition *)&part_array[i * part_entry_len];
}
-/* TODO: move to libbb */
static uint32_t
gpt_crc32(void *buf, int len)
{
- return 0xffffffff ^ crc32_block_endian0(0xffffffff, buf, len, global_crc32_table);
+ return ~crc32_block_endian0(0xffffffff, buf, len, global_crc32_table);
}
static void