From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id CC66524F1D for ; Fri, 5 Jul 2019 12:35:43 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2fYYJMWvRX0N for ; Fri, 5 Jul 2019 12:35:43 -0400 (EDT) Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [94.100.177.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id EA3FA24F0D for ; Fri, 5 Jul 2019 12:35:42 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 1/6] sql: refactor sql_atoi64() Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Content-Type: text/html; charset=us-ascii From: n.pettik In-Reply-To: <32c57e1b-41b6-81f3-b3f0-176e50263a94@tarantool.org> Date: Fri, 5 Jul 2019 19:32:45 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <4E0304EC-50F7-4FAA-803C-7BEC107F2B45@tarantool.org> References: <15f86ff05673055364c6a6bd11de4568e4c3854f.1559919361.git.korablev@tarantool.org> <0ae708be-9670-e726-b7ea-9faec8c007ea@tarantool.org> <9898E449-3735-4744-83A9-47B1DC64A72C@tarantool.org> <32c57e1b-41b6-81f3-b3f0-176e50263a94@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: Vladislav Shpilevoy


On 2 Jul = 2019, at 00:53, Vladislav Shpilevoy <v.shpilevoy@tarantool.org> = wrote:

Hi! Thanks for the fixes!

Consider new ones below, = and on the branch
in a separate = commit.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D

diff --git a/src/box/sql/expr.c = b/src/box/sql/expr.c
index 0df050e7a..bf347b401 100644
--- = a/src/box/sql/expr.c
+++ b/src/box/sql/expr.c
@@ -3292,11 +3292,10 = @@ expr_code_int(struct Parse *parse, struct Expr *expr, bool = is_neg,
= const char *sign =3D is_neg ? "-" : "";
if (z[0] = =3D=3D '0' && (z[1] =3D=3D 'x' || z[1] =3D=3D 'X')) {
errno =3D = 0;
- = = char *end =3D NULL;
if (is_neg) {
- value =3D = strtoll(z, &end, 16);
+ value =3D strtoll(z, NULL, = 16);
= = } else {
- value =3D strtoull(z, &end, = 16);
+ = = = value =3D strtoull(z, NULL, 16);
if (value > = INT64_MAX)
= = = = goto int_overflow;
= }

Applied.
=