diff options
author | 2014-10-30 22:40:35 -0700 | |
---|---|---|
committer | 2014-10-30 22:40:35 -0700 | |
commit | a529fc9d83295fdf9418436b68d056162ba8231b (patch) | |
tree | 97cf66daca3b5e7efb927c7e37fc7515ec8b0ceb /parse_util.cpp | |
parent | 173a6a71c03847158a434c3fd63e5759bf933239 (diff) |
Set of fixes for issues identified by cppcheck
Diffstat (limited to 'parse_util.cpp')
-rw-r--r-- | parse_util.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/parse_util.cpp b/parse_util.cpp index e89883c9..0b2d79fa 100644 --- a/parse_util.cpp +++ b/parse_util.cpp @@ -53,7 +53,7 @@ int parse_util_lineno(const wchar_t *str, size_t offset) return 0; int res = 1; - for (size_t i=0; str[i] && i<offset; i++) + for (size_t i=0; i < offset && str[i] != L'\0'; i++) { if (str[i] == L'\n') { @@ -1186,7 +1186,6 @@ parser_test_error_bits_t parse_util_detect_errors_in_argument(const parse_node_t { const wcstring subst(paran_begin + 1, paran_end); - wcstring tmp; // Replace the command substitution with just INTERNAL_SEPARATOR size_t cmd_sub_start = paran_begin - working_copy_cstr; |