[git commit master 1/1] crc32: cleanups, no code changes

Denys Vlasenko vda.linux at googlemail.com
Thu Oct 28 03:38:11 UTC 2010


commit: http://git.busybox.net/busybox/commit/?id=16cc80e9890c0409921b0463e5678649a893ae7f
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 libbb/crc32.c          |    2 +-
 util-linux/fdisk_gpt.c |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/libbb/crc32.c b/libbb/crc32.c
index 2cc6ea7..c63bf07 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
 	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;
diff --git a/util-linux/fdisk_gpt.c b/util-linux/fdisk_gpt.c
index 4dfb5b2..1ab1293 100644
--- a/util-linux/fdisk_gpt.c
+++ b/util-linux/fdisk_gpt.c
@@ -55,11 +55,10 @@ gpt_part(int i)
 	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
-- 
1.7.1



More information about the busybox-cvs mailing list