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>
This commit is contained in:
parent
442e06d9c6
commit
ba7657cb19
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue