From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 05427452566 for ; Mon, 11 Nov 2019 18:06:39 +0300 (MSK) From: Nikita Pettik Date: Mon, 11 Nov 2019 18:06:32 +0300 Message-Id: <20191111150632.95154-1-korablev@tarantool.org> Subject: [Tarantool-patches] [PATCH] json: fix assert typo in json_path_cmp() List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org 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. --- Branch: https://github.com/tarantool/tarantool/tree/np/json-assert-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 1bfef172a..ffac2c2b5 100644 --- a/src/lib/json/json.c +++ b/src/lib/json/json.c @@ -302,7 +302,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}, -- 2.15.1