lint: "collapsible if statements" warnings

This commit is contained in:
Kurtis Rader
2016-10-22 11:21:13 -07:00
parent a8c9019a39
commit 42458ff7ab
22 changed files with 349 additions and 446 deletions

View File

@@ -1208,12 +1208,10 @@ parse_execution_result_t parse_execution_context_t::run_1_job(const parse_node_t
// Get terminal modes.
struct termios tmodes = {};
if (shell_is_interactive()) {
if (tcgetattr(STDIN_FILENO, &tmodes)) {
// Need real error handling here.
wperror(L"tcgetattr");
return parse_execution_errored;
}
if (shell_is_interactive() && tcgetattr(STDIN_FILENO, &tmodes)) {
// Need real error handling here.
wperror(L"tcgetattr");
return parse_execution_errored;
}
// Increment the eval_level for the duration of this command.