more int -> bool

all the things
This commit is contained in:
Aaron Gyes 2021-12-09 00:52:45 -08:00
parent b3a4b23d9b
commit ce475c0b4c
3 changed files with 3 additions and 4 deletions

View File

@ -110,7 +110,7 @@ set(FISH_SRCS
src/null_terminated_array.cpp src/operation_context.cpp src/output.cpp
src/pager.cpp src/parse_execution.cpp src/parse_tree.cpp src/parse_util.cpp
src/parser.cpp src/parser_keywords.cpp src/path.cpp src/postfork.cpp
src/proc.cpp src/reader.cpp src/redirection.cpp src/sanity.cpp src/screen.cpp
src/proc.cpp src/reader.cpp src/redirection.cpp src/screen.cpp
src/signal.cpp src/termsize.cpp src/timer.cpp src/tinyexpr.cpp
src/tokenizer.cpp src/topic_monitor.cpp src/trace.cpp src/utf8.cpp src/util.cpp
src/wait_handle.cpp src/wcstringutil.cpp src/wgetopt.cpp src/wildcard.cpp

View File

@ -143,7 +143,7 @@ static bool handler_matches(const event_handler_t &classv, const event_t &instan
}
/// Test if specified event is blocked.
static int event_is_blocked(parser_t &parser, const event_t &e) {
static bool event_is_blocked(parser_t &parser, const event_t &e) {
(void)e;
const block_t *block;
size_t idx = 0;

View File

@ -813,7 +813,7 @@ static bool append_syntax_error(parse_error_list_t *errors, size_t source_locati
/// Returns 1 if the specified command is a builtin that may not be used in a pipeline.
static const wchar_t *const forbidden_pipe_commands[] = {L"exec", L"case", L"break", L"return",
L"continue"};
static int parser_is_pipe_forbidden(const wcstring &word) {
static bool parser_is_pipe_forbidden(const wcstring &word) {
return contains(forbidden_pipe_commands, word);
}
@ -1228,7 +1228,6 @@ parser_test_error_bits_t parse_util_detect_errors(const ast::ast_t &ast, const w
// Expand all commands.
// Verify 'or' and 'and' not used inside pipelines.
// Verify pipes via parser_is_pipe_forbidden.
// Verify return only within a function.
// Verify no variable expansions.
wcstring storage;