mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-11 12:38:50 +00:00
lint: unnecessary else statement
This commit is contained in:
parent
2d46969d3e
commit
4a2aed1f8e
4 changed files with 11 additions and 11 deletions
|
@ -313,7 +313,7 @@ bool autoload_t::locate_file_and_maybe_load_it(const wcstring &cmd, bool really_
|
|||
|
||||
if (really_load) {
|
||||
return reloaded;
|
||||
} else {
|
||||
return found_file || has_script_source;
|
||||
}
|
||||
|
||||
return found_file || has_script_source;
|
||||
}
|
||||
|
|
|
@ -1886,12 +1886,12 @@ static int builtin_read(parser_t &parser, io_streams_t &streams, wchar_t **argv)
|
|||
argv[0], w.woptarg);
|
||||
builtin_print_help(parser, streams, argv[0], streams.err);
|
||||
return STATUS_BUILTIN_ERROR;
|
||||
} else {
|
||||
streams.err.append_format(_(L"%ls: Argument '%ls' must be an integer\n"),
|
||||
argv[0], w.woptarg);
|
||||
builtin_print_help(parser, streams, argv[0], streams.err);
|
||||
return STATUS_BUILTIN_ERROR;
|
||||
}
|
||||
|
||||
streams.err.append_format(_(L"%ls: Argument '%ls' must be an integer\n"),
|
||||
argv[0], w.woptarg);
|
||||
builtin_print_help(parser, streams, argv[0], streams.err);
|
||||
return STATUS_BUILTIN_ERROR;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -272,9 +272,9 @@ bool function_get_desc(const wcstring &name, wcstring *out_desc) {
|
|||
if (out_desc && func && !func->description.empty()) {
|
||||
out_desc->assign(_(func->description.c_str()));
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void function_set_desc(const wcstring &name, const wcstring &desc) {
|
||||
|
|
|
@ -370,7 +370,7 @@ bool paths_are_same_file(const wcstring &path1, const wcstring &path2) {
|
|||
struct stat s1, s2;
|
||||
if (wstat(path1, &s1) == 0 && wstat(path2, &s2) == 0) {
|
||||
return s1.st_ino == s2.st_ino && s1.st_dev == s2.st_dev;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue