From 3ce3ad33ea92d9a4b032566249a3ad86dc3bd2a7 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Wed, 9 Jul 2014 19:37:33 +0200 Subject: [PATCH] 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. --- filesetup.c | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.25.1