diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2014-01-12 13:33:35 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2014-01-12 13:33:35 -0800 |
commit | 89069fdaa4fff2f8b703fef0be260eb4d4c2ed9b (patch) | |
tree | 89d1d66d214ae3f149c8e152b1fd7cd204395670 /builtin.cpp | |
parent | 1130e4782de6378a7ad2cbb39cfb1626d7233fe8 (diff) |
Miscellaneous minor fixes based on cppcheck static analyzer
Diffstat (limited to 'builtin.cpp')
-rw-r--r-- | builtin.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/builtin.cpp b/builtin.cpp index e475e777..b52c8e9e 100644 --- a/builtin.cpp +++ b/builtin.cpp @@ -244,9 +244,6 @@ wcstring builtin_help_get(parser_t &parser, const wchar_t *name) static void builtin_print_help(parser_t &parser, const wchar_t *cmd, wcstring &b) { - - int is_short = 0; - if (&b == &stderr_buffer) { stderr_buffer.append(parser.current_line()); @@ -260,7 +257,7 @@ static void builtin_print_help(parser_t &parser, const wchar_t *cmd, wcstring &b wchar_t *str = wcsdup(h.c_str()); if (str) { - + bool is_short = false; if (&b == &stderr_buffer) { @@ -279,7 +276,7 @@ static void builtin_print_help(parser_t &parser, const wchar_t *cmd, wcstring &b int cut=0; int i; - is_short = 1; + is_short = true; /* First move down 4 lines @@ -738,7 +735,6 @@ static int builtin_block(parser_t &parser, wchar_t **argv) int scope=UNSET; int erase = 0; int argc=builtin_count_args(argv); - int type = (1<<EVENT_ANY); woptind=0; @@ -836,7 +832,7 @@ static int builtin_block(parser_t &parser, wchar_t **argv) block_t *block = parser.block_at_index(block_idx); event_blockage_t eb = {}; - eb.typemask = type; + eb.typemask = (1<<EVENT_ANY); switch (scope) { |