From d60e63d8d4237f9f0ea4a53624f418ff595a9b18 Mon Sep 17 00:00:00 2001 From: Nikita Pettik <korablev@tarantool.org> Date: Mon, 11 Nov 2019 17:12:47 +0300 Subject: [PATCH] json: fix assert typo in json_path_cmp() 284 int 285 json_path_cmp(const char *a, int a_len, const char *b, int b_len, 286 int index_base) 287 { ... 304 /* Paths a and b must be valid. */ 305 assert(rc_b == 0 && rc_b == 0); Obviously (according to the comment) author implied that both rc_a == 0 and rc_b == 0. Let's fix this small typo. --- src/lib/json/json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/json/json.c b/src/lib/json/json.c index 416c7dfda7..24d956f586 100644 --- a/src/lib/json/json.c +++ b/src/lib/json/json.c @@ -291,7 +291,7 @@ json_path_cmp(const char *a, int a_len, const char *b, int b_len, return rc; } /* Paths a and b must be valid. */ - assert(rc_b == 0 && rc_b == 0); + assert(rc_a == 0 && rc_b == 0); /* * The parser stopped because the end of one of the paths * was reached. As JSON_TOKEN_END > JSON_TOKEN_{NUM, STR}, -- GitLab