aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-02-20 11:51:40 -0800
committerGuy Harris <guy@alum.mit.edu>2018-02-20 19:52:15 +0000
commitba7657cb19f3a221c842bbf12b1efc2ac12c9dc0 (patch)
treeb4dbae718a19341edb64f134d2dc9ffe061770a0
parent442e06d9c67434fa60df82abefc4005a36fb102e (diff)
Cast away constness at the point where it can't be avoided.
The only reason why we have to cast it away is that C doesn't have a good framework for creating collections of objects of arbitrary type (where type includes constness) and we're using a datatype (GHashTable) implemented and declared in C here. Do it in the g_hash_table_insert() call. Change-Id: Ibd7706255519a97b77e4e4a52fada43e050f2bf0 Reviewed-on: https://code.wireshark.org/review/25938 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--ui/qt/wireless_timeline.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/qt/wireless_timeline.cpp b/ui/qt/wireless_timeline.cpp
index dbe90f2774..d4c30d6132 100644
--- a/ui/qt/wireless_timeline.cpp
+++ b/ui/qt/wireless_timeline.cpp
@@ -360,10 +360,10 @@ void WirelessTimeline::tap_timeline_reset(void* tapdata)
gboolean WirelessTimeline::tap_timeline_packet(void *tapdata, packet_info* pinfo, epan_dissect_t* edt _U_, const void *data)
{
WirelessTimeline* timeline = (WirelessTimeline*)tapdata;
- struct wlan_radio *wlan_radio_info = (struct wlan_radio *)data;
+ const struct wlan_radio *wlan_radio_info = (const struct wlan_radio *)data;
/* Save the radio information in our own (GUI) hashtable */
- g_hash_table_insert(timeline->radio_packet_list, GUINT_TO_POINTER(pinfo->num), wlan_radio_info);
+ g_hash_table_insert(timeline->radio_packet_list, GUINT_TO_POINTER(pinfo->num), (gpointer)wlan_radio_info);
return FALSE;
}