summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-03-29 19:40:56 +0100
committerSergei Golubchik <serg@mariadb.org>2019-03-29 19:41:41 +0100
commit4e1d3f83b79cd5f3a920937b462e585fdfb5a35d (patch)
tree07e099b50109bd09ff8a5267c5cb5e0bf89597b4 /strings
parenta82cfe109cbc033253ddaba82f9c2de663601002 (diff)
parentcc71e7501cb623b2d600c47dbe10a31dcf6e8fcf (diff)
downloadmariadb-git-4e1d3f83b79cd5f3a920937b462e585fdfb5a35d.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'strings')
-rw-r--r--strings/json_lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/strings/json_lib.c b/strings/json_lib.c
index 7a6e0c5cbff..24c79cb9044 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
{
@@ -1845,4 +1845,3 @@ int json_path_compare(const json_path_t *a, const json_path_t *b,
return json_path_parts_compare(a->steps+1, a->last_step,
b->steps+1, b->last_step, vt);
}
-