From 541d66d70b8fbe9860b31307c0760e6d5f4c78a8 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 27 Mar 2007 19:50:11 +0200 Subject: [PATCH] Use clear_error() instead of clearing the error manually Signed-off-by: Jens Axboe --- filesetup.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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); } } -- 2.25.1