thin_check: tidy up some unintuitive code

This commit is contained in:
Joe Thornber 2015-06-22 11:13:19 +01:00
parent 6ab0833b2e
commit 082491d140

View File

@ -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) {