From: Andreas Gruenbacher Date: Wed, 9 Jul 2014 17:37:33 +0000 (+0200) Subject: Fix two error paths X-Git-Tag: fio-2.1.11~3 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=3ce3ad33ea92d9a4b032566249a3ad86dc3bd2a7;p=fio.git Fix two error paths In generic_open_file(), when an error is detected, return 1 to indicate the failure. In get_file_sizes(), when an error other than ENOENT is detected, fail immediately and don't clear the error. --- diff --git a/filesetup.c b/filesetup.c index 1facccd7..39c276a3 100644 --- a/filesetup.c +++ b/filesetup.c @@ -609,6 +609,7 @@ open_again: } td_verror(td, __e, buf); + return 1; } if (!from_hash && f->fd != -1) { @@ -661,6 +662,7 @@ static int get_file_sizes(struct thread_data *td) if (td->error != ENOENT) { log_err("%s\n", td->verror); err = 1; + break; } clear_error(td); }