From 89cdab788f3716b335fefb60b836ebcf975aceab Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 31 Mar 2008 11:02:01 -0400 Subject: crc32: use uint32_t rather than unsigned long The envcrc.c does sizeof(unsigned long) when calculating the crc, but this is done with the build toolchain instead of the target tool chain, so if the build is a 64bit system but the target is 32bits, the size will obviously be wrong. This converts all unsigned long stuff related to crc32 to uint32_t types. Compile tested only: output of ./tools/envcrc when run on a 32bit build system matches that of a 64bit build system. Signed-off-by: Mike Frysinger Acked-by: Jean-Christophe PLAGNIOL-VILLARD --- common/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/image.c b/common/image.c index d218f2f..8e72db1 100644 --- a/common/image.c +++ b/common/image.c @@ -155,7 +155,7 @@ static table_entry_t uimage_comp[] = { { -1, "", "", }, }; -unsigned long crc32 (unsigned long, const unsigned char *, unsigned int); +uint32_t crc32 (uint32_t, const unsigned char *, uint); static void genimg_print_size (uint32_t size); #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE) || defined(USE_HOSTCC) static void genimg_print_time (time_t timestamp); -- cgit v1.1