diff options
Diffstat (limited to '')
-rw-r--r-- | ui/cli/tap-icmpv6stat.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/cli/tap-icmpv6stat.c b/ui/cli/tap-icmpv6stat.c index 94f8692a..627c9de2 100644 --- a/ui/cli/tap-icmpv6stat.c +++ b/ui/cli/tap-icmpv6stat.c @@ -37,10 +37,10 @@ void register_tap_listener_icmpv6stat(void); typedef struct _icmpv6stat_t { char *filter; GSList *rt_list; - guint num_rqsts; - guint num_resps; - guint min_frame; - guint max_frame; + unsigned num_rqsts; + unsigned num_resps; + unsigned min_frame; + unsigned max_frame; double min_msecs; double max_msecs; double tot_msecs; @@ -65,11 +65,11 @@ icmpv6stat_reset(void *tapdata) g_slist_free(icmpv6stat->rt_list); memset(icmpv6stat, 0, sizeof(icmpv6stat_t)); - icmpv6stat->min_msecs = 1.0 * G_MAXUINT; + icmpv6stat->min_msecs = 1.0 * UINT_MAX; } -static gint compare_doubles(gconstpointer a, gconstpointer b) +static int compare_doubles(const void *a, const void *b) { double ad, bd; @@ -238,7 +238,7 @@ icmpv6stat_draw(void *tapdata) 100.0 * lost / icmpv6stat->num_rqsts); printf("Minimum Maximum Mean Median SDeviation Min Frame Max Frame\n"); printf("%-10.3f%-10.3f%-10.3f%-10.3f%-10.3f %-10u%-10u\n", - icmpv6stat->min_msecs >= G_MAXUINT ? 0.0 : icmpv6stat->min_msecs, + icmpv6stat->min_msecs >= UINT_MAX ? 0.0 : icmpv6stat->min_msecs, icmpv6stat->max_msecs, mean, med, sdev, icmpv6stat->min_frame, icmpv6stat->max_frame); } else { @@ -272,7 +272,7 @@ icmpv6stat_init(const char *opt_arg, void *userdata _U_) exit(1); } memset(icmpv6stat, 0, sizeof(icmpv6stat_t)); - icmpv6stat->min_msecs = 1.0 * G_MAXUINT; + icmpv6stat->min_msecs = 1.0 * UINT_MAX; icmpv6stat->filter = g_strdup(filter); |