Compare functions for various collection data types don't need to modify
what they're comparing, so keep everything const.
Change-Id: I1c2cff6954b1a8c5ade74943934324d0bd8f523c
Reviewed-on: https://code.wireshark.org/review/12884
Reviewed-by: Guy Harris <guy@alum.mit.edu>
static gint
insert_sorted_by_table_name(gconstpointer aparam, gconstpointer bparam)
{
static gint
insert_sorted_by_table_name(gconstpointer aparam, gconstpointer bparam)
{
- const register_rtd_t *a = (register_rtd_t *)aparam;
- const register_rtd_t *b = (register_rtd_t *)bparam;
+ const register_rtd_t *a = (const register_rtd_t *)aparam;
+ const register_rtd_t *b = (const register_rtd_t *)bparam;
return g_ascii_strcasecmp(proto_get_protocol_short_name(find_protocol_by_id(a->proto_id)), proto_get_protocol_short_name(find_protocol_by_id(b->proto_id)));
}
return g_ascii_strcasecmp(proto_get_protocol_short_name(find_protocol_by_id(a->proto_id)), proto_get_protocol_short_name(find_protocol_by_id(b->proto_id)));
}
static gint
insert_sorted_by_table_name(gconstpointer aparam, gconstpointer bparam)
{
static gint
insert_sorted_by_table_name(gconstpointer aparam, gconstpointer bparam)
{
- const register_srt_t *a = (register_srt_t *)aparam;
- const register_srt_t *b = (register_srt_t *)bparam;
+ const register_srt_t *a = (const register_srt_t *)aparam;
+ const register_srt_t *b = (const register_srt_t *)bparam;
return g_ascii_strcasecmp(proto_get_protocol_short_name(find_protocol_by_id(a->proto_id)), proto_get_protocol_short_name(find_protocol_by_id(b->proto_id)));
}
return g_ascii_strcasecmp(proto_get_protocol_short_name(find_protocol_by_id(a->proto_id)), proto_get_protocol_short_name(find_protocol_by_id(b->proto_id)));
}
static gint
insert_sorted_by_cli_string(gconstpointer aparam, gconstpointer bparam)
{
static gint
insert_sorted_by_cli_string(gconstpointer aparam, gconstpointer bparam)
{
- const new_stat_tap_ui *a = (new_stat_tap_ui *)aparam;
- const new_stat_tap_ui *b = (new_stat_tap_ui *)bparam;
+ const new_stat_tap_ui *a = (const new_stat_tap_ui *)aparam;
+ const new_stat_tap_ui *b = (const new_stat_tap_ui *)bparam;
return g_ascii_strcasecmp(a->cli_string, b->cli_string);
}
return g_ascii_strcasecmp(a->cli_string, b->cli_string);
}
static gint
compare_stat_menu_item(gconstpointer stat_a, gconstpointer stat_b)
{
static gint
compare_stat_menu_item(gconstpointer stat_a, gconstpointer stat_b)
{
- stats_tree_cfg* stat_cfg_a = (stats_tree_cfg*)stat_a;
- stats_tree_cfg* stat_cfg_b = (stats_tree_cfg*)stat_b;
+ const stats_tree_cfg* stat_cfg_a = (const stats_tree_cfg*)stat_a;
+ const stats_tree_cfg* stat_cfg_b = (const stats_tree_cfg*)stat_b;
return strcmp(stat_cfg_a->name, stat_cfg_b->name);
}
return strcmp(stat_cfg_a->name, stat_cfg_b->name);
}