From 462b00351abaf9a02b012a59dadf57755ea4d0da Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 14 Oct 2008 14:53:56 -0700 Subject: [PATCH] checking buffer before calculating the crc (for debug) --- src/common/sctp_crc32.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/common/sctp_crc32.c b/src/common/sctp_crc32.c index 33a441c1a9204..2de1e320cc0ae 100644 --- a/src/common/sctp_crc32.c +++ b/src/common/sctp_crc32.c @@ -716,8 +716,18 @@ sctp_csum_finalize(uint32_t crc32c) return (crc32c); } +#if 1 +#include +#include +#endif /* this code should be removed, and was introduced only for debugging purposes */ + uint32_t crc32c_le(uint32_t crc, unsigned char const *data, unsigned length) { +#if 1 + if (memcmp(data, data, length) != 0) { + printf("CRCRCRCRCRCRCRC !!!\n"); + } +#endif /* this code should be removed, and was introduced only for debugging purposes */ return update_crc32(crc, data, length); } -- 2.39.5