diff options
-rw-r--r-- | libbb/crc32.c | 2 | ||||
-rw-r--r-- | util-linux/fdisk_gpt.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/libbb/crc32.c b/libbb/crc32.c index 2cc6ea779..c63bf0772 100644 --- a/libbb/crc32.c +++ b/libbb/crc32.c | |||
@@ -59,7 +59,7 @@ uint32_t FAST_FUNC crc32_block_endian0(uint32_t val, const void *buf, unsigned l | |||
59 | const void *end = (uint8_t*)buf + len; | 59 | const void *end = (uint8_t*)buf + len; |
60 | 60 | ||
61 | while (buf != end) { | 61 | while (buf != end) { |
62 | val = crc_table [(uint8_t)val ^ *(uint8_t*)buf] ^ (val >> 8); | 62 | val = crc_table[(uint8_t)val ^ *(uint8_t*)buf] ^ (val >> 8); |
63 | buf = (uint8_t*)buf + 1; | 63 | buf = (uint8_t*)buf + 1; |
64 | } | 64 | } |
65 | return val; | 65 | return val; |
diff --git a/util-linux/fdisk_gpt.c b/util-linux/fdisk_gpt.c index 4dfb5b227..1ab1293de 100644 --- a/util-linux/fdisk_gpt.c +++ b/util-linux/fdisk_gpt.c | |||
@@ -55,11 +55,10 @@ gpt_part(int i) | |||
55 | return (gpt_partition *)&part_array[i * part_entry_len]; | 55 | return (gpt_partition *)&part_array[i * part_entry_len]; |
56 | } | 56 | } |
57 | 57 | ||
58 | /* TODO: move to libbb */ | ||
59 | static uint32_t | 58 | static uint32_t |
60 | gpt_crc32(void *buf, int len) | 59 | gpt_crc32(void *buf, int len) |
61 | { | 60 | { |
62 | return 0xffffffff ^ crc32_block_endian0(0xffffffff, buf, len, global_crc32_table); | 61 | return ~crc32_block_endian0(0xffffffff, buf, len, global_crc32_table); |
63 | } | 62 | } |
64 | 63 | ||
65 | static void | 64 | static void |