summaryrefslogtreecommitdiff
path: root/ui/cli
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-01-20 03:11:16 +0000
committerJoão Valverde <j@v6e.pt>2016-01-21 02:30:18 +0000
commit4dd3f668dc9a86be0353d9572d9624bb7cca9bf5 (patch)
treee7f7923826d4024d884047f270cc37c47669e1a6 /ui/cli
parent770eb649d847b620b5bc820a5cc6eef6e4c2d330 (diff)
downloadwireshark-4dd3f668dc9a86be0353d9572d9624bb7cca9bf5.tar.gz
Avoid returning malloced memory as const [-Wcast-qual]
Change-Id: I0b2c03cbde963d13d07ef13284d85b922eec3be9 Reviewed-on: https://code.wireshark.org/review/13439 Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'ui/cli')
-rw-r--r--ui/cli/tap-endpoints.c4
-rw-r--r--ui/cli/tap-iousers.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/ui/cli/tap-endpoints.c b/ui/cli/tap-endpoints.c
index cbdc110f76..5e261bd29b 100644
--- a/ui/cli/tap-endpoints.c
+++ b/ui/cli/tap-endpoints.c
@@ -78,10 +78,10 @@ endpoints_draw(void *arg)
if (tot_frames == last_frames) {
/* XXX - TODO: make name resolution configurable (through gbl_resolv_flags?) */
- conversation_str = (char*)get_conversation_address(NULL, &host->myaddress, TRUE);
+ conversation_str = get_conversation_address(NULL, &host->myaddress, TRUE);
if (display_port) {
/* XXX - TODO: make port resolution configurable (through gbl_resolv_flags?) */
- port_str = (char*)get_conversation_port(NULL, host->port, host->ptype, TRUE);
+ port_str = get_conversation_port(NULL, host->port, host->ptype, TRUE);
printf("%-20s %5s %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER
"u %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u %6"
G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u \n",
diff --git a/ui/cli/tap-iousers.c b/ui/cli/tap-iousers.c
index adff91b155..06f02697ac 100644
--- a/ui/cli/tap-iousers.c
+++ b/ui/cli/tap-iousers.c
@@ -101,12 +101,12 @@ iousers_draw(void *arg)
if (tot_frames == last_frames) {
/* XXX - TODO: make name / port resolution configurable (through gbl_resolv_flags?) */
- src_addr = (char*)get_conversation_address(NULL, &iui->src_address, TRUE);
- dst_addr = (char*)get_conversation_address(NULL, &iui->dst_address, TRUE);
+ src_addr = get_conversation_address(NULL, &iui->src_address, TRUE);
+ dst_addr = get_conversation_address(NULL, &iui->dst_address, TRUE);
if (display_ports) {
char *src, *dst, *src_port, *dst_port;
- src_port = (char*)get_conversation_port(NULL, iui->src_port, iui->ptype, TRUE);
- dst_port = (char*)get_conversation_port(NULL, iui->dst_port, iui->ptype, TRUE);
+ src_port = get_conversation_port(NULL, iui->src_port, iui->ptype, TRUE);
+ dst_port = get_conversation_port(NULL, iui->dst_port, iui->ptype, TRUE);
src = wmem_strconcat(NULL, src_addr, ":", src_port, NULL);
dst = wmem_strconcat(NULL, dst_addr, ":", dst_port, NULL);
printf("%-26s <-> %-26s %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER