mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-25 02:01:15 -03:00
lint cleanup: eliminate "redundant" errors
This removes some pointless parentheses but the primary focus is removing redundancies like unnecessary "else" clauses.
This commit is contained in:
@@ -213,16 +213,18 @@ parse_execution_context_t::execution_cancellation_reason_t
|
||||
parse_execution_context_t::cancellation_reason(const block_t *block) const {
|
||||
if (shell_is_exiting()) {
|
||||
return execution_cancellation_exit;
|
||||
} else if (parser && parser->cancellation_requested) {
|
||||
}
|
||||
if (parser && parser->cancellation_requested) {
|
||||
return execution_cancellation_skip;
|
||||
} else if (block && block->loop_status != LOOP_NORMAL) {
|
||||
}
|
||||
if (block && block->loop_status != LOOP_NORMAL) {
|
||||
// Nasty hack - break and continue set the 'skip' flag as well as the loop status flag.
|
||||
return execution_cancellation_loop_control;
|
||||
} else if (block && block->skip) {
|
||||
return execution_cancellation_skip;
|
||||
} else {
|
||||
return execution_cancellation_none;
|
||||
}
|
||||
if (block && block->skip) {
|
||||
return execution_cancellation_skip;
|
||||
}
|
||||
return execution_cancellation_none;
|
||||
}
|
||||
|
||||
/// Return whether the job contains a single statement, of block type, with no redirections.
|
||||
@@ -1042,10 +1044,9 @@ parse_execution_result_t parse_execution_context_t::populate_boolean_process(
|
||||
|
||||
if (skip_job) {
|
||||
return parse_execution_skipped;
|
||||
} else {
|
||||
const parse_node_t &subject = *tree.get_child(bool_statement, 1, symbol_statement);
|
||||
return this->populate_job_process(job, proc, subject);
|
||||
}
|
||||
const parse_node_t &subject = *tree.get_child(bool_statement, 1, symbol_statement);
|
||||
return this->populate_job_process(job, proc, subject);
|
||||
}
|
||||
|
||||
parse_execution_result_t parse_execution_context_t::populate_block_process(
|
||||
|
||||
Reference in New Issue
Block a user