aboutsummaryrefslogtreecommitdiffstats
path: root/epan/stats_tree.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-12-28 12:33:17 -0800
committerGuy Harris <guy@alum.mit.edu>2015-12-28 20:34:15 +0000
commit18c5496137a0da931b2cf2f52b5a76b570b5a881 (patch)
tree08b866afb29cd1e89178800f4634c599abf84d3e /epan/stats_tree.c
parenta1c27ef7cf3686fae90b034bcad40c68dbc91fb1 (diff)
Don't cast away constness unnecessarily.
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>
Diffstat (limited to 'epan/stats_tree.c')
-rw-r--r--epan/stats_tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/stats_tree.c b/epan/stats_tree.c
index c837277f96..1b1a0f4290 100644
--- a/epan/stats_tree.c
+++ b/epan/stats_tree.c
@@ -373,8 +373,8 @@ stats_tree_get_cfg_by_abbr(const char *abbr)
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);
}