diff options
| author | Xin LI <delphij@FreeBSD.org> | 2022-07-10 23:31:35 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2022-07-10 23:31:35 +0000 |
| commit | 0bbf2702963a2fe6f7bb025d5d07ee4195856b8f (patch) | |
| tree | c9530618de1eca6e0e490fde817a30957b8df3ab /lib/libproc/crc32.h | |
| parent | 8f4a5fc6bc6c4e9e0739326199d73ee4401ebd58 (diff) | |
Diffstat (limited to 'lib/libproc/crc32.h')
| -rw-r--r-- | lib/libproc/crc32.h | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/libproc/crc32.h b/lib/libproc/crc32.h deleted file mode 100644 index 3812a83f971f..000000000000 --- a/lib/libproc/crc32.h +++ /dev/null @@ -1,28 +0,0 @@ -/*- - * COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or - * code or tables extracted from it, as desired without restriction. - * - * $FreeBSD$ - */ - -#ifndef _CRC32_H_ -#define _CRC32_H_ - -#include <stdint.h> /* uint32_t */ -#include <stdlib.h> /* size_t */ - -extern uint32_t crc32_tab[]; - -static __inline uint32_t -crc32(const void *buf, size_t size) -{ - const uint8_t *p = buf; - uint32_t crc; - - crc = ~0U; - while (size--) - crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8); - return (crc ^ ~0U); -} - -#endif /* !_CRC32_H_ */ |
