mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-11 20:48:49 +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) {
|
if (really_load) {
|
||||||
return reloaded;
|
return reloaded;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
return found_file || has_script_source;
|
return found_file || has_script_source;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1886,13 +1886,13 @@ static int builtin_read(parser_t &parser, io_streams_t &streams, wchar_t **argv)
|
||||||
argv[0], w.woptarg);
|
argv[0], w.woptarg);
|
||||||
builtin_print_help(parser, streams, argv[0], streams.err);
|
builtin_print_help(parser, streams, argv[0], streams.err);
|
||||||
return STATUS_BUILTIN_ERROR;
|
return STATUS_BUILTIN_ERROR;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
streams.err.append_format(_(L"%ls: Argument '%ls' must be an integer\n"),
|
streams.err.append_format(_(L"%ls: Argument '%ls' must be an integer\n"),
|
||||||
argv[0], w.woptarg);
|
argv[0], w.woptarg);
|
||||||
builtin_print_help(parser, streams, argv[0], streams.err);
|
builtin_print_help(parser, streams, argv[0], streams.err);
|
||||||
return STATUS_BUILTIN_ERROR;
|
return STATUS_BUILTIN_ERROR;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 's': {
|
case 's': {
|
||||||
|
|
|
@ -272,9 +272,9 @@ bool function_get_desc(const wcstring &name, wcstring *out_desc) {
|
||||||
if (out_desc && func && !func->description.empty()) {
|
if (out_desc && func && !func->description.empty()) {
|
||||||
out_desc->assign(_(func->description.c_str()));
|
out_desc->assign(_(func->description.c_str()));
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void function_set_desc(const wcstring &name, const wcstring &desc) {
|
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;
|
struct stat s1, s2;
|
||||||
if (wstat(path1, &s1) == 0 && wstat(path2, &s2) == 0) {
|
if (wstat(path1, &s1) == 0 && wstat(path2, &s2) == 0) {
|
||||||
return s1.st_ino == s2.st_ino && s1.st_dev == s2.st_dev;
|
return s1.st_ino == s2.st_ino && s1.st_dev == s2.st_dev;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue