summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-04-02 11:04:54 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-04-02 11:04:54 +0300
commit5c3ff5cb93f8363820d506cdad3daafbc944f03b (patch)
treef5671e95dabd8ced0c7925e54b351bd704e41bcf /strings
parentf9ab7b473a935141f85d27994d0faf3433a73144 (diff)
parent7b42d892de6acc04490f5cb6b8355c72b8f1a406 (diff)
downloadmariadb-git-5c3ff5cb93f8363820d506cdad3daafbc944f03b.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'strings')
-rw-r--r--strings/json_lib.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/strings/json_lib.c b/strings/json_lib.c
index 6c94ce2271e..3763ac4ed54 100644
--- a/strings/json_lib.c
+++ b/strings/json_lib.c
@@ -1407,7 +1407,7 @@ int json_find_paths_next(json_engine_t *je, json_find_paths_t *state)
if (!json_key_matches(je, &key_name))
continue;
}
- if ((uint) (cur_step - state->paths[p_c].last_step) == state->cur_depth)
+ if (cur_step == state->paths[p_c].last_step + state->cur_depth)
path_found= TRUE;
else
{
@@ -1440,7 +1440,7 @@ int json_find_paths_next(json_engine_t *je, json_find_paths_t *state)
cur_step->n_item == state->array_counters[state->cur_depth])
{
/* Array item matches. */
- if ((uint) (cur_step - state->paths[p_c].last_step) == state->cur_depth)
+ if (cur_step == state->paths[p_c].last_step + state->cur_depth)
path_found= TRUE;
else
{
@@ -2094,5 +2094,3 @@ err_return:
return 1;
}
-
-