diff options
author | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2012-12-16 00:43:37 +0000 |
---|---|---|
committer | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2012-12-16 00:43:37 +0000 |
commit | b369116122629461616bf6dc517c09dac512aa1f (patch) | |
tree | 9bea24fbd45188f774b02f706019ee5beabd2ced /ui/gtk | |
parent | 2dbf4f6fffb7b81d83d05ffc4e20788d3f03bb44 (diff) | |
download | wireshark-b369116122629461616bf6dc517c09dac512aa1f.tar.gz |
Don't cast away constness of passed-in tap structs.
svn path=/trunk/; revision=46552
Diffstat (limited to 'ui/gtk')
-rw-r--r-- | ui/gtk/mac_lte_stat_dlg.c | 4 | ||||
-rw-r--r-- | ui/gtk/rlc_lte_graph.c | 4 | ||||
-rw-r--r-- | ui/gtk/rlc_lte_stat_dlg.c | 4 | ||||
-rw-r--r-- | ui/gtk/tcp_graph.c | 8 |
4 files changed, 10 insertions, 10 deletions
diff --git a/ui/gtk/mac_lte_stat_dlg.c b/ui/gtk/mac_lte_stat_dlg.c index 5457353f75..3ca5a08fa7 100644 --- a/ui/gtk/mac_lte_stat_dlg.c +++ b/ui/gtk/mac_lte_stat_dlg.c @@ -263,7 +263,7 @@ static void mac_lte_stat_reset(void *phs) /* Allocate a mac_lte_ep_t struct to store info for new UE */ -static mac_lte_ep_t* alloc_mac_lte_ep(struct mac_lte_tap_info *si, packet_info *pinfo _U_) +static mac_lte_ep_t* alloc_mac_lte_ep(const struct mac_lte_tap_info *si, packet_info *pinfo _U_) { mac_lte_ep_t* ep; int n; @@ -341,7 +341,7 @@ static int mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *ed mac_lte_ep_t *tmp = NULL, *te = NULL; /* Cast tap info struct */ - struct mac_lte_tap_info *si = (struct mac_lte_tap_info *)phi; + const struct mac_lte_tap_info *si = (const struct mac_lte_tap_info *)phi; if (!hs) { return 0; diff --git a/ui/gtk/rlc_lte_graph.c b/ui/gtk/rlc_lte_graph.c index de0a81127a..0db6c393ef 100644 --- a/ui/gtk/rlc_lte_graph.c +++ b/ui/gtk/rlc_lte_graph.c @@ -750,7 +750,7 @@ tapall_rlc_lte_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, co { rlc_scan_t *ts=(rlc_scan_t *)pct; struct graph *g = ts->g; - rlc_lte_tap_info *rlchdr=(rlc_lte_tap_info*)vip; + const rlc_lte_tap_info *rlchdr = (const rlc_lte_tap_info*)vip; /* See if this one matches current channel */ if (compare_headers(g->ueid, g->channelType, g->channelId, g->rlcMode, g->direction, @@ -854,7 +854,7 @@ tap_lte_rlc_packet(void *pct, packet_info *pinfo _U_, epan_dissect_t *edt _U_, c int n; gboolean is_unique = TRUE; th_t *th = pct; - rlc_lte_tap_info *header = (rlc_lte_tap_info*)vip; + const rlc_lte_tap_info *header = (const rlc_lte_tap_info*)vip; /* Check new header details against any/all stored ones */ for (n=0; n < th->num_hdrs; n++) { diff --git a/ui/gtk/rlc_lte_stat_dlg.c b/ui/gtk/rlc_lte_stat_dlg.c index 1f5e3e338d..f39b7f37f6 100644 --- a/ui/gtk/rlc_lte_stat_dlg.c +++ b/ui/gtk/rlc_lte_stat_dlg.c @@ -312,7 +312,7 @@ static void rlc_lte_stat_reset(void *phs) /* Allocate a rlc_lte_ep_t struct to store info for new UE */ -static rlc_lte_ep_t* alloc_rlc_lte_ep(struct rlc_lte_tap_info *si, packet_info *pinfo _U_) +static rlc_lte_ep_t* alloc_rlc_lte_ep(const struct rlc_lte_tap_info *si, packet_info *pinfo _U_) { rlc_lte_ep_t* ep; int n; @@ -385,7 +385,7 @@ static int rlc_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *ed rlc_channel_stats *channel_stats = NULL; /* Cast tap info struct */ - struct rlc_lte_tap_info *si = (struct rlc_lte_tap_info *)phi; + const struct rlc_lte_tap_info *si = (const struct rlc_lte_tap_info *)phi; /* Need this */ if (!hs) { diff --git a/ui/gtk/tcp_graph.c b/ui/gtk/tcp_graph.c index 68f68383e3..beea062725 100644 --- a/ui/gtk/tcp_graph.c +++ b/ui/gtk/tcp_graph.c @@ -424,7 +424,7 @@ static void callback_create_help (GtkWidget * , gpointer ); static void get_mouse_position (GtkWidget *, int *pointer_x, int *pointer_y, GdkModifierType *mask); static void update_zoom_spins (struct graph * ); static struct tcpheader *select_tcpip_session (capture_file *, struct segment * ); -static int compare_headers (address *saddr1, address *daddr1, guint16 sport1, guint16 dport1, address *saddr2, address *daddr2, guint16 sport2, guint16 dport2, int dir); +static int compare_headers (address *saddr1, address *daddr1, guint16 sport1, guint16 dport1, const address *saddr2, const address *daddr2, guint16 sport2, guint16 dport2, int dir); static int get_num_dsegs (struct graph * ); static int get_num_acks (struct graph *, int * ); static void graph_type_dependent_initialize (struct graph * ); @@ -1838,7 +1838,7 @@ tapall_tcpip_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, cons { tcp_scan_t *ts=(tcp_scan_t *)pct; struct graph *g = ts->g; - struct tcpheader *tcphdr=(struct tcpheader *)vip; + const struct tcpheader *tcphdr = (const struct tcpheader *)vip; if (compare_headers(&g->src_address, &g->dst_address, g->src_port, g->dst_port, @@ -1937,7 +1937,7 @@ tap_tcpip_packet(void *pct, packet_info *pinfo _U_, epan_dissect_t *edt _U_, con int n; gboolean is_unique = TRUE; th_t *th=pct; - struct tcpheader *header = (struct tcpheader *)vip; + const struct tcpheader *header = (const struct tcpheader *)vip; /* Check new header details against any/all stored ones */ for (n=0; n < th->num_hdrs; n++) { @@ -2048,7 +2048,7 @@ static struct tcpheader *select_tcpip_session (capture_file *cf, struct segment } -static int compare_headers (address *saddr1, address *daddr1, guint16 sport1, guint16 dport1, address *saddr2, address *daddr2, guint16 sport2, guint16 dport2, int dir) +static int compare_headers (address *saddr1, address *daddr1, guint16 sport1, guint16 dport1, const address *saddr2, const address *daddr2, guint16 sport2, guint16 dport2, int dir) { int dir1, dir2; |