clang-tidy: simplify two bool returns

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-08-17 16:23:02 -07:00 committed by Fabian Homborg
parent fe71e62a68
commit 1af9e5d21e
2 changed files with 2 additions and 5 deletions

View File

@ -1174,9 +1174,7 @@ static bool should_import_bash_history_line(const wcstring &line) {
// In doing this test do not allow incomplete strings. Hence the "false" argument.
parse_error_list_t errors;
parse_util_detect_errors(line, &errors);
if (!errors.empty()) return false;
return true;
return errors.empty();
}
/// Import a bash command history file. Bash's history format is very simple: just lines with #s for

View File

@ -105,8 +105,7 @@ bool path_is_executable(const std::string &path) {
if (errno != EACCES) wperror(L" stat");
return false;
}
if (!S_ISREG(buff.st_mode)) return false;
return true;
return S_ISREG(buff.st_mode);
}
/// \return 1 if the path is remote, 0 if local, -1 if unknown.