From f3a02d34b0585468b8d063002a766960839266d2 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 17 Mar 2019 15:09:41 -0700 Subject: [PATCH] Don't cast away constness if you don't have to. Change-Id: I33621fa638c421cc394a3a7fc822e3b609fc91c1 Reviewed-on: https://code.wireshark.org/review/32461 Reviewed-by: Guy Harris --- ui/traffic_table_ui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/traffic_table_ui.c b/ui/traffic_table_ui.c index 03bd24d8c8..3da1eaa3ba 100644 --- a/ui/traffic_table_ui.c +++ b/ui/traffic_table_ui.c @@ -137,11 +137,11 @@ write_endpoint_geoip_map(FILE *fp, gboolean json_only, hostlist_talker_t *const char addr[WS_INET6_ADDRSTRLEN]; const mmdb_lookup_t *result = NULL; if (host->myaddress.type == AT_IPv4) { - ws_in4_addr *ip4 = (ws_in4_addr *)host->myaddress.data; + const ws_in4_addr *ip4 = (const ws_in4_addr *)host->myaddress.data; result = maxmind_db_lookup_ipv4(ip4); ws_inet_ntop4(ip4, addr, sizeof(addr)); } else if (host->myaddress.type == AT_IPv6) { - ws_in6_addr *ip6 = (ws_in6_addr *)host->myaddress.data; + const ws_in6_addr *ip6 = (const ws_in6_addr *)host->myaddress.data; result = maxmind_db_lookup_ipv6(ip6); ws_inet_ntop6(ip6, addr, sizeof(addr)); }