From 082491d140970e4adc463689c380947f248809aa Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Mon, 22 Jun 2015 11:13:19 +0100 Subject: [PATCH] thin_check: tidy up some unintuitive code --- thin-provisioning/thin_check.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/thin-provisioning/thin_check.cc b/thin-provisioning/thin_check.cc index 7eb5bd0..9e46af4 100644 --- a/thin-provisioning/thin_check.cc +++ b/thin-provisioning/thin_check.cc @@ -323,11 +323,11 @@ namespace { err = metadata_check(path, fs); if (fs.ignore_non_fatal_errors) - success = (err == FATAL) ? 1 : 0; + success = (err == FATAL) ? false : true; else - success = (err == NO_ERROR) ? 0 : 1; + success = (err == NO_ERROR) ? true : false; - if (!success && fs.clear_needs_check_flag_on_success) + if (success && fs.clear_needs_check_flag_on_success) clear_needs_check(path); } catch (std::exception &e) { @@ -337,7 +337,7 @@ namespace { return 1; } - return success; + return !success; } void usage(ostream &out, string const &cmd) {