From 60c33e05cf6960b79506e959bcfc6de484908449 Mon Sep 17 00:00:00 2001 From: Pavel Demin Date: Sun, 1 Apr 2018 13:57:20 +0200 Subject: [PATCH] fix return type of crc10_check and crc12_check --- crc10.c | 4 +++- crc12.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/crc10.c b/crc10.c index 2ddddcb..025018d 100644 --- a/crc10.c +++ b/crc10.c @@ -1,3 +1,5 @@ +#include + static unsigned short table[256] = { 0x0000, 0x048f, 0x091e, 0x0d91, 0x123c, 0x16b3, 0x1b22, 0x1fad, @@ -51,7 +53,7 @@ short crc10(unsigned char const *data, int length) return remainder & 0x03ff; } -short crc10_check(unsigned char const *data, int length) +bool crc10_check(unsigned char const *data, int length) { return !crc10(data, length); } diff --git a/crc12.c b/crc12.c index f666edf..a4dc144 100644 --- a/crc12.c +++ b/crc12.c @@ -1,3 +1,5 @@ +#include + static unsigned short table[256] = { 0x0000, 0x1c06, 0x340a, 0x280c, 0x6814, 0x7412, 0x5c1e, 0x4018, @@ -51,7 +53,7 @@ short crc12(unsigned char const *data, int length) return remainder & 0x0fff; } -short crc12_check(unsigned char const *data, int length) +bool crc12_check(unsigned char const *data, int length) { return !crc12(data, length); }