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 <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2019-03-17 15:09:41 -07:00
parent f2e511e148
commit f3a02d34b0
1 changed files with 2 additions and 2 deletions

View File

@ -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));
}