mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 09:58:54 +08:00
clang-tidy: simplify two bool returns
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
fe71e62a68
commit
1af9e5d21e
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user