summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-03-28 12:07:20 +0100
committerSergei Golubchik <serg@mariadb.org>2019-03-29 10:58:25 +0100
commitcc71e7501cb623b2d600c47dbe10a31dcf6e8fcf (patch)
tree40e7fc721aef0c68e2c0c60c42dcf8825e0f051e /strings
parentf2a0c758da3d9f0fa42c96114b453cf4835bcbab (diff)
downloadmariadb-git-cc71e7501cb623b2d600c47dbe10a31dcf6e8fcf.tar.gz
post-merge: -Werror fixes in 10.2
Diffstat (limited to 'strings')
-rw-r--r--strings/json_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/strings/json_lib.c b/strings/json_lib.c
index 394517a4ab6..3ce9b0c503f 100644
--- a/strings/json_lib.c
+++ b/strings/json_lib.c
@@ -1409,7 +1409,7 @@ int json_find_paths_next(json_engine_t *je, json_find_paths_t *state)
if (!json_key_matches(je, &key_name))
continue;
}
- if (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
{
@@ -1442,7 +1442,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 (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
{