]> git.sur5r.net Git - u-boot/blobdiff - lib_generic/crc32.c
Merge with /home/stefan/git/u-boot/denx
[u-boot] / lib_generic / crc32.c
index 2de39c7db719d52eaae494e16eabf775fe0d64f3..3d99b69296c7e4504126b175a58176581ff57f08 100644 (file)
@@ -155,7 +155,6 @@ uLong ZEXPORT crc32(crc, buf, len)
     const Bytef *buf;
     uInt len;
 {
-    if (buf == Z_NULL) return 0L;
 #ifdef DYNAMIC_CRC_TABLE
     if (crc_table_empty)
       make_crc_table();
@@ -172,14 +171,14 @@ uLong ZEXPORT crc32(crc, buf, len)
     return crc ^ 0xffffffffL;
 }
 
-#if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
+#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || \
+       ((CONFIG_COMMANDS & CFG_CMD_NAND) && !defined(CFG_NAND_LEGACY))
 
 /* No ones complement version. JFFS2 (and other things ?)
  * don't use ones compliment in their CRC calculations.
  */
 uLong ZEXPORT crc32_no_comp(uLong crc, const Bytef *buf, uInt len)
 {
-    if (buf == Z_NULL) return 0L;
 #ifdef DYNAMIC_CRC_TABLE
     if (crc_table_empty)
       make_crc_table();