From ce475c0b4ca0e87588c267fc812de36c4391ed59 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Thu, 9 Dec 2021 00:52:45 -0800 Subject: [PATCH] more int -> bool all the things --- CMakeLists.txt | 2 +- src/event.cpp | 2 +- src/parse_util.cpp | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d02ede576..51805628f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/src/event.cpp b/src/event.cpp index 801ba1b62..7f574d66e 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -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; diff --git a/src/parse_util.cpp b/src/parse_util.cpp index 1bb85a827..077553ca3 100644 --- a/src/parse_util.cpp +++ b/src/parse_util.cpp @@ -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;