From: Tobias Diedrich Date: Tue, 20 Oct 2015 22:39:49 +0000 (+0200) Subject: Remove local modifications from tinfgzip.c that were included accidentally. X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bee4e0301f99405f6179738d07c237c9a9a4d74b;p=oweals%2Fu-boot_mod.git Remove local modifications from tinfgzip.c that were included accidentally. --- diff --git a/u-boot/lib_generic/tinfgzip.c b/u-boot/lib_generic/tinfgzip.c index ebc4d9e..1a16795 100644 --- a/u-boot/lib_generic/tinfgzip.c +++ b/u-boot/lib_generic/tinfgzip.c @@ -32,7 +32,6 @@ */ #include "tinf.h" -#include #define FTEXT 1 #define FHCRC 2 @@ -113,25 +112,13 @@ int tinf_gzip_uncompress(void *dest, unsigned int *destLen, res = tinf_uncompress(dst, destLen, start, src + sourceLen - start - 8); - if (res != TINF_OK) { - puts("uncompress error"); - return TINF_DATA_ERROR; - } + if (res != TINF_OK) return TINF_DATA_ERROR; -#if 0 - if (*destLen != dlen) { - printf("len error %d != %d", *destLen, dlen); - return TINF_DATA_ERROR; - } + if (*destLen != dlen) return TINF_DATA_ERROR; /* -- check CRC32 checksum -- */ - if (crc32 != tinf_crc32(dst, *destLen)) { - return TINF_DATA_ERROR; - } -#endif - printf("expected len %08x vs decoded %08x\n", dlen, *destLen); - printf("expected crc32 %08x vs calculated %08x\n", crc32, tinf_crc32(dst, *destLen)); + if (crc32 != tinf_crc32(dst, dlen)) return TINF_DATA_ERROR; return TINF_OK; }