From 70d977764ccc1cd9a6587c93a72b8af4e15fbf89 Mon Sep 17 00:00:00 2001 From: Kovarththanan Rajaratnam Date: Sun, 4 Oct 2009 17:21:45 +0000 Subject: Constify wimax_mac_calc_crc32() svn path=/trunk/; revision=30309 --- plugins/wimax/crc.c | 2 +- plugins/wimax/crc.h | 2 +- plugins/wimax/mac_hd_generic_decoder.c | 2 +- plugins/wimax/msg_dlmap.c | 2 +- plugins/wimax/wimax_harq_map_decoder.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/wimax/crc.c b/plugins/wimax/crc.c index 504ef59435..74b76b9c8c 100644 --- a/plugins/wimax/crc.c +++ b/plugins/wimax/crc.c @@ -126,7 +126,7 @@ void wimax_mac_gen_crc8_table(void) SIDE EFFECTS: */ -guint32 wimax_mac_calc_crc32(guint8 *data, guint data_len) +guint32 wimax_mac_calc_crc32(const guint8 *data, guint data_len) { guint32 crc=CRC32_INITIAL_VALUE; guint i, j; diff --git a/plugins/wimax/crc.h b/plugins/wimax/crc.h index 65d4cd136e..327f12e230 100644 --- a/plugins/wimax/crc.h +++ b/plugins/wimax/crc.h @@ -40,7 +40,7 @@ void wimax_mac_gen_crc32_table(void); void wimax_mac_gen_crc8_table(void); #endif -guint32 wimax_mac_calc_crc32 (guint8 *data, guint data_len); +guint32 wimax_mac_calc_crc32(const guint8 *data, guint data_len); guint16 wimax_mac_calc_crc16(guint8 *data, guint data_len); guint8 wimax_mac_calc_crc8 (guint8 *data, guint data_len); diff --git a/plugins/wimax/mac_hd_generic_decoder.c b/plugins/wimax/mac_hd_generic_decoder.c index 2fc9a4bb28..4fcfc652ec 100644 --- a/plugins/wimax/mac_hd_generic_decoder.c +++ b/plugins/wimax/mac_hd_generic_decoder.c @@ -1252,7 +1252,7 @@ check_crc: { /* get the CRC */ mac_crc = tvb_get_ntohl(tvb, mac_len - sizeof(mac_crc)); /* calculate the CRC */ - calculated_crc = wimax_mac_calc_crc32((guint8 *)tvb_get_ptr(tvb, 0, mac_len - sizeof(mac_crc)), mac_len - sizeof(mac_crc)); + calculated_crc = wimax_mac_calc_crc32(tvb_get_ptr(tvb, 0, mac_len - sizeof(mac_crc)), mac_len - sizeof(mac_crc)); /* display the CRC */ generic_item = proto_tree_add_item(tree, hf_mac_header_generic_crc, tvb, mac_len - sizeof(mac_crc), sizeof(mac_crc), FALSE); if (mac_crc != calculated_crc) diff --git a/plugins/wimax/msg_dlmap.c b/plugins/wimax/msg_dlmap.c index 584b53b493..51bfbaf7ac 100644 --- a/plugins/wimax/msg_dlmap.c +++ b/plugins/wimax/msg_dlmap.c @@ -2168,7 +2168,7 @@ gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tre { /* get the CRC */ mac_crc = tvb_get_ntohl(tvb, mac_len - sizeof(mac_crc)); /* calculate the CRC */ - calculated_crc = wimax_mac_calc_crc32((guint8 *)tvb_get_ptr(tvb, 0, mac_len - sizeof(mac_crc)), mac_len - sizeof(mac_crc)); + calculated_crc = wimax_mac_calc_crc32(tvb_get_ptr(tvb, 0, mac_len - sizeof(mac_crc)), mac_len - sizeof(mac_crc)); /* display the CRC */ generic_item = proto_tree_add_item(base_tree, hf_mac_header_compress_dlmap_crc, tvb, mac_len - sizeof(mac_crc), sizeof(mac_crc), FALSE); if (mac_crc != calculated_crc) diff --git a/plugins/wimax/wimax_harq_map_decoder.c b/plugins/wimax/wimax_harq_map_decoder.c index cde0c368a1..0610e8e6f2 100644 --- a/plugins/wimax/wimax_harq_map_decoder.c +++ b/plugins/wimax/wimax_harq_map_decoder.c @@ -167,7 +167,7 @@ void dissector_wimax_harq_map_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t /* get the CRC */ harq_map_msg_crc = tvb_get_ntohl(tvb, length - sizeof(harq_map_msg_crc)); /* calculate the HARQ MAM Message CRC */ - calculated_crc = wimax_mac_calc_crc32((guint8 *)tvb_get_ptr(tvb, 0, length - sizeof(harq_map_msg_crc)), length - sizeof(harq_map_msg_crc)); + calculated_crc = wimax_mac_calc_crc32(tvb_get_ptr(tvb, 0, length - sizeof(harq_map_msg_crc)), length - sizeof(harq_map_msg_crc)); /* display the CRC */ it = proto_tree_add_item(harq_map_tree, hf_harq_map_msg_crc, tvb, length - sizeof(harq_map_msg_crc), sizeof(harq_map_msg_crc), FALSE); /* verify the CRC */ -- cgit v1.2.3