diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/wlan_stat_dlg.c | 14 | ||||
-rw-r--r-- | ui/time_shift.c | 4 |
2 files changed, 8 insertions, 10 deletions
diff --git a/ui/gtk/wlan_stat_dlg.c b/ui/gtk/wlan_stat_dlg.c index 9998055b94..8bf670cd30 100644 --- a/ui/gtk/wlan_stat_dlg.c +++ b/ui/gtk/wlan_stat_dlg.c @@ -230,7 +230,7 @@ invalidate_detail_iters (wlanstat_t *hs) } static wlan_ep_t* -alloc_wlan_ep (struct _wlan_hdr *si, packet_info *pinfo _U_) +alloc_wlan_ep (const struct _wlan_hdr *si, const packet_info *pinfo _U_) { wlan_ep_t *ep; @@ -256,7 +256,7 @@ alloc_wlan_ep (struct _wlan_hdr *si, packet_info *pinfo _U_) } static wlan_details_ep_t * -alloc_wlan_details_ep (address *addr) +alloc_wlan_details_ep (const address *addr) { wlan_details_ep_t *d_ep; @@ -282,7 +282,7 @@ alloc_wlan_details_ep (address *addr) } static wlan_details_ep_t * -get_details_ep (wlan_ep_t *te, address *addr) +get_details_ep (wlan_ep_t *te, const address *addr) { wlan_details_ep_t *tmp, *d_te = NULL; @@ -311,7 +311,7 @@ get_details_ep (wlan_ep_t *te, address *addr) } static void -wlanstat_packet_details (wlan_ep_t *te, guint32 type, address *addr, gboolean src) +wlanstat_packet_details (wlan_ep_t *te, guint32 type, const address *addr, gboolean src) { wlan_details_ep_t *d_te = get_details_ep (te, addr); @@ -357,7 +357,7 @@ wlanstat_packet_details (wlan_ep_t *te, guint32 type, address *addr, gboolean sr } static gboolean -is_broadcast(address *addr) +is_broadcast(const address *addr) { #if 0 /* doesn't work if MAC resolution is disable */ @@ -367,7 +367,7 @@ is_broadcast(address *addr) } static gboolean -ssid_equal(struct _wlan_stats *st1, struct _wlan_stats *st2 ) +ssid_equal(const struct _wlan_stats *st1, const struct _wlan_stats *st2 ) { return (st1->ssid_len == st2->ssid_len) && (memcmp(st1->ssid, st2->ssid, st1->ssid_len) == 0); } @@ -377,7 +377,7 @@ wlanstat_packet (void *phs, packet_info *pinfo, epan_dissect_t *edt _U_, const v { wlanstat_t *hs = (wlanstat_t *)phs; wlan_ep_t *tmp, *te = NULL; - struct _wlan_hdr *si = (struct _wlan_hdr *) phi; + const struct _wlan_hdr *si = (const struct _wlan_hdr *) phi; if (!hs) return (0); diff --git a/ui/time_shift.c b/ui/time_shift.c index 658b79b884..ec490f7d74 100644 --- a/ui/time_shift.c +++ b/ui/time_shift.c @@ -134,13 +134,11 @@ calcNT3(nstime_t *OT1, nstime_t *OT3, nstime_t *NT1, nstime_t *NT3, const gchar * time_string_parse(const gchar *time_text, int *year, int *month, int *day, gboolean *negative, int *hour, int *minute, long double *second) { - gchar *pts; + const gchar *pts = time_text; if (!time_text || !hour || !minute || !second) return "Unable to convert time."; - pts = (gchar *)time_text; - /* strip whitespace */ while (isspace(pts[0])) ++pts; |