Some variable are assigned during initialization and another time with
the same value a very few later.
That's clearly useless and could lead to an error if only one is changed.
case FIO_GETOPT_IOENGINE: {
const char *opt = l_opts[lidx].name;
char *val = optarg;
- opt = l_opts[lidx].name;
- val = optarg;
ret = fio_cmd_ioengine_option_parse(td, opt, val);
break;
}
int calc_lat(struct io_stat *is, unsigned long *min, unsigned long *max,
double *mean, double *dev)
{
- double n = is->samples;
+ double n = (double) is->samples;
- if (is->samples == 0)
+ if (n == 0)
return 0;
*min = is->min_val;
*max = is->max_val;
-
- n = (double) is->samples;
*mean = is->mean.u.f;
if (n > 1.0)