X-Git-Url: https://git.archive.openwrt.org/?p=openwrt.git;a=blobdiff_plain;f=package%2Fmtd%2Fsrc%2Fcrc32.h;fp=package%2Fmtd%2Fsrc%2Fcrc32.h;h=0000000000000000000000000000000000000000;hp=68f8ee4febd7cfdb8faa9ad7195a5789ca8e4ee0;hb=4d953d3a481dd847524eae78c7aae00153bc7efd;hpb=801985e5286881dd578a19280b2a6c8e212a530d diff --git a/package/mtd/src/crc32.h b/package/mtd/src/crc32.h deleted file mode 100644 index 68f8ee4feb..0000000000 --- a/package/mtd/src/crc32.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef CRC32_H -#define CRC32_H - -#include - -extern const uint32_t crc32_table[256]; - -/* Return a 32-bit CRC of the contents of the buffer. */ - -static inline uint32_t -crc32(uint32_t val, const void *ss, int len) -{ - const unsigned char *s = ss; - while (--len >= 0) - val = crc32_table[(val ^ *s++) & 0xff] ^ (val >> 8); - return val; -} - -static inline unsigned int crc32buf(char *buf, size_t len) -{ - return crc32(0xFFFFFFFF, buf, len); -} - - - -#endif