diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-02-17 11:30:01 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-02-17 19:30:35 +0000 |
commit | 8b9dfbaba9f10cffd41b0cca1446a7a6c5b6eb90 (patch) | |
tree | af40942248b3b3bc716bc547478abc3bc4a9325a /wsutil/crc8.h | |
parent | dc8bd7c3a9efd30651c5c31b37ae27b2169592db (diff) |
The CRC8 routines don't modify the buffer; make the pointers to it const.
This lets us get rid of some casts that provoke "drops const qualifier"
warnings.
Change-Id: Ia7e0863bd97bc20dbbb810e13778ec78d0cf3c91
Reviewed-on: https://code.wireshark.org/review/25837
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil/crc8.h')
-rw-r--r-- | wsutil/crc8.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wsutil/crc8.h b/wsutil/crc8.h index b8ca2f6fb1..269fbc2ea4 100644 --- a/wsutil/crc8.h +++ b/wsutil/crc8.h @@ -27,7 +27,7 @@ extern "C" { * @param seed The seed to use. * @return the CRC8 checksum for the buffer */ -WS_DLL_PUBLIC guint8 crc8_0x2F(guint8 *buf, guint32 len, guint8 seed); +WS_DLL_PUBLIC guint8 crc8_0x2F(const guint8 *buf, guint32 len, guint8 seed); /** Calculates a CRC8 checksum for the given buffer with the polynom * 0x37 using the precompiled CRC table @@ -36,7 +36,7 @@ WS_DLL_PUBLIC guint8 crc8_0x2F(guint8 *buf, guint32 len, guint8 seed); * @param seed The seed to use. * @return the CRC8 checksum for the buffer */ -WS_DLL_PUBLIC guint8 crc8_0x37(guint8 *buf, guint32 len, guint8 seed); +WS_DLL_PUBLIC guint8 crc8_0x37(const guint8 *buf, guint32 len, guint8 seed); /** Calculates a CRC8 checksum for the given buffer with the polynom * 0x3B using the precompiled CRC table @@ -45,7 +45,7 @@ WS_DLL_PUBLIC guint8 crc8_0x37(guint8 *buf, guint32 len, guint8 seed); * @param seed The seed to use. * @return the CRC8 checksum for the buffer */ -WS_DLL_PUBLIC guint8 crc8_0x3B(guint8 *buf, guint32 len, guint8 seed); +WS_DLL_PUBLIC guint8 crc8_0x3B(const guint8 *buf, guint32 len, guint8 seed); #ifdef __cplusplus } |