lint: unnecessary else statement

This commit is contained in:
Kurtis Rader 2016-10-28 17:42:50 -07:00
parent 2d46969d3e
commit 4a2aed1f8e
4 changed files with 11 additions and 11 deletions

View file

@ -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;
} }

View file

@ -1886,12 +1886,12 @@ 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"),
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; break;
} }

View file

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

View file

@ -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;
} }