aboutsummaryrefslogtreecommitdiffstats
path: root/timestats.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2008-08-28 19:50:46 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2008-08-28 19:50:46 +0000
commit3fde4c8d582dbe95055c29477e404a0e28565fea (patch)
tree2b1a6c27ae5ae55dcfb01c14b6ad673f19bc6723 /timestats.c
parentaf9c93221f85bc65a859c6cde7d6f1d3fa38d54a (diff)
In time_stat_init(), initialize all the structure members.
Initialize the nstime_t members by calling nstime_set_zero(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26102 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'timestats.c')
-rw-r--r--timestats.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/timestats.c b/timestats.c
index ac50f50fc1..ccbfa16fd0 100644
--- a/timestats.c
+++ b/timestats.c
@@ -30,12 +30,12 @@ void
time_stat_init(timestat_t *stats)
{
stats->num = 0;
- stats->min.secs = 0;
- stats->min.nsecs = 0;
- stats->max.secs = 0;
- stats->max.nsecs = 0;
- stats->tot.secs = 0;
- stats->tot.nsecs = 0;
+ stats->min_num = 0;
+ stats->max_num = 0;
+ nstime_set_zero(&stats->min);
+ nstime_set_zero(&stats->max);
+ nstime_set_zero(&stats->tot);
+ stats->variance = 0.0;
}
/* Update a timestat_t struct with a new sample */