From: Jens Axboe Date: Tue, 27 Mar 2007 17:50:11 +0000 (+0200) Subject: Use clear_error() instead of clearing the error manually X-Git-Tag: fio-1.15~12 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=541d66d70b8fbe9860b31307c0760e6d5f4c78a8;p=fio.git Use clear_error() instead of clearing the error manually Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index bf28b41a..40a16638 100644 --- a/filesetup.c +++ b/filesetup.c @@ -276,10 +276,9 @@ static void get_file_sizes(struct thread_data *td) unsigned int i; for_each_file(td, f, i) { - if (td->io_ops->open_file(td, f)) { - td->error = 0; - memset(td->verror, 0, sizeof(td->verror)); - } else + if (td->io_ops->open_file(td, f)) + clear_error(td); + else td->io_ops->close_file(td, f); } }