aboutsummaryrefslogtreecommitdiffstats
path: root/ui/cli/tap-icmpstat.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-06 17:35:11 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-06 17:35:11 +0000
commit7990a0e4d0a7d3046be11164c98fae3e578477ca (patch)
tree0d70167b77c40aca949d8ced1698f3b622415f20 /ui/cli/tap-icmpstat.c
parentc6231cc4c4f4c9a7e311b989fffd8ebb777bec1c (diff)
Use explicit casts.
svn path=/trunk/; revision=48137
Diffstat (limited to 'ui/cli/tap-icmpstat.c')
-rw-r--r--ui/cli/tap-icmpstat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/cli/tap-icmpstat.c b/ui/cli/tap-icmpstat.c
index 66cb89e7ee..a392360912 100644
--- a/ui/cli/tap-icmpstat.c
+++ b/ui/cli/tap-icmpstat.c
@@ -67,7 +67,7 @@ typedef struct _icmpstat_t {
static void
icmpstat_reset(void *tapdata)
{
- icmpstat_t *icmpstat = tapdata;
+ icmpstat_t *icmpstat = (icmpstat_t *)tapdata;
g_slist_free(icmpstat->rt_list);
memset(icmpstat, 0, sizeof(icmpstat_t));
@@ -115,8 +115,8 @@ static gint compare_doubles(gconstpointer a, gconstpointer b)
static int
icmpstat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data)
{
- icmpstat_t *icmpstat = tapdata;
- const icmp_transaction_t *trans = data;
+ icmpstat_t *icmpstat = (icmpstat_t *)tapdata;
+ const icmp_transaction_t *trans = (const icmp_transaction_t *)data;
double resp_time, *rt;
if (trans == NULL)
@@ -124,7 +124,7 @@ icmpstat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
if (trans->resp_frame) {
resp_time = nstime_to_msec(&trans->resp_time);
- rt = g_malloc(sizeof(double));
+ rt = g_new(double,1);
if (rt == NULL)
return 0;
*rt = resp_time;
@@ -222,7 +222,7 @@ static void compute_stats(icmpstat_t *icmpstat, double *mean, double *med, doubl
static void
icmpstat_draw(void *tapdata)
{
- icmpstat_t *icmpstat = tapdata;
+ icmpstat_t *icmpstat = (icmpstat_t *)tapdata;
unsigned int lost;
double mean, sdev, med;
@@ -269,7 +269,7 @@ icmpstat_init(const char *optarg, void* userdata _U_)
if (strstr(optarg, "icmp,srt,"))
filter = optarg + strlen("icmp,srt,");
- icmpstat = g_try_malloc(sizeof(icmpstat_t));
+ icmpstat = (icmpstat_t *)g_try_malloc(sizeof(icmpstat_t));
if (icmpstat == NULL) {
fprintf(stderr, "tshark: g_try_malloc() fatal error.\n");
exit(1);