The struct fileio is used after fileio_close().
Move fileio_close() after last usage.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
address += this_run_size;
}
- if ((retvaltemp = fileio_close(&fileio)) != ERROR_OK)
- return retvaltemp;
-
if ((ERROR_OK == retval) && (duration_measure(&bench) == ERROR_OK))
{
int filesize;
duration_elapsed(&bench), duration_kbps(&bench, filesize));
}
+ if ((retvaltemp = fileio_close(&fileio)) != ERROR_OK)
+ return retvaltemp;
+
return retval;
}