diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2015-11-27 23:04:16 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-29 00:25:11 +0000 |
commit | 5e6d45ca98bb8c368b73084785d90fa3b0b6291f (patch) | |
tree | 7e541c16d0e31ef60e35d2be7ba27f8a477523cc /ui/gtk/rtp_stream_dlg.c | |
parent | cfc47c15c2b902a50764a21cbcd2ba1d78b1de7a (diff) |
Make address_to_display() use proper (non-)constness
Don't return allocated memory as a const pointer.
Fixes multiple [-Wcast-qual] warnings.
Change-Id: Ie9ceac27fa2a5eba41a5392ac983ff28c3939239
Reviewed-on: https://code.wireshark.org/review/12267
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/gtk/rtp_stream_dlg.c')
-rw-r--r-- | ui/gtk/rtp_stream_dlg.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/gtk/rtp_stream_dlg.c b/ui/gtk/rtp_stream_dlg.c index a53aaaef6e..e87549ea43 100644 --- a/ui/gtk/rtp_stream_dlg.c +++ b/ui/gtk/rtp_stream_dlg.c @@ -635,8 +635,8 @@ rtpstream_view_selection_func(GtkTreeSelection *selection, GtkTreeModel *model, } if (selected_stream_fwd) { - src_addr = (char*)address_to_display(NULL, &(selected_stream_fwd->src_addr)); - dst_addr = (char*)address_to_display(NULL, &(selected_stream_fwd->dest_addr)); + src_addr = address_to_display(NULL, &(selected_stream_fwd->src_addr)); + dst_addr = address_to_display(NULL, &(selected_stream_fwd->dest_addr)); g_snprintf(label_text, sizeof(label_text), "Forward: %s:%u -> %s:%u, SSRC=0x%X", src_addr, @@ -657,8 +657,8 @@ rtpstream_view_selection_func(GtkTreeSelection *selection, GtkTreeModel *model, } if (selected_stream_rev) { - src_addr = (char*)address_to_display(NULL, &(selected_stream_rev->src_addr)); - dst_addr = (char*)address_to_display(NULL, &(selected_stream_rev->dest_addr)); + src_addr = address_to_display(NULL, &(selected_stream_rev->src_addr)); + dst_addr = address_to_display(NULL, &(selected_stream_rev->dest_addr)); g_snprintf(label_text, sizeof(label_text), "Reverse: %s:%u -> %s:%u, SSRC=0x%X", src_addr, @@ -700,9 +700,9 @@ add_to_list_store(rtp_stream_info_t* strinfo) in g_snprintf("%f") functions */ setlocale(LC_NUMERIC, "C"); - data[0] = (gchar*)address_to_display(NULL, &(strinfo->src_addr)); + data[0] = address_to_display(NULL, &(strinfo->src_addr)); data[1] = NULL; - data[2] = (gchar*)address_to_display(NULL, &(strinfo->dest_addr)); + data[2] = address_to_display(NULL, &(strinfo->dest_addr)); data[3] = NULL; data[4] = wmem_strdup_printf(NULL, "0x%X", strinfo->ssrc); if (strinfo->payload_type_name != NULL) { |