- if (td->o.ratemin[0] || td->o.ratemin[1])
- memcpy(&td->lastrate, &td->stat_sample_time,
- sizeof(td->lastrate));
+ if (td->o.ratemin[0] || td->o.ratemin[1]) {
+ memcpy(&td->lastrate[0], &td->bw_sample_time,
+ sizeof(td->bw_sample_time));
+ memcpy(&td->lastrate[1], &td->bw_sample_time,
+ sizeof(td->bw_sample_time));
+ }