From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id A7E716C7D3; Tue, 30 Mar 2021 02:14:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A7E716C7D3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617059668; bh=75SO7+izLcfAd+vcq76P9YnM+RDIvuWJqRNxWaTJ8K4=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=QBUuRQmZ+XGdPPtaJwbvrIBy2jrehXhAlE1O9HgFmHnAZ1NFRgXPR4fp4LgLOn+LH YEL7V/ZFSgDHew/JTt4O3BWAaQDTMo+i1rad+wiYzb92t8PC0F2Qtjdn8vq9FdRyfh aI9xc9Cjjh5qLMhvcKex/39U8kJJXWVCyoam3ANI= Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 13BC36C7D3 for ; Tue, 30 Mar 2021 02:08:26 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 13BC36C7D3 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1lR0zh-0003S5-DE; Tue, 30 Mar 2021 02:08:25 +0300 To: imeevma@tarantool.org, tsafin@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: <5c19097b726f62d9ba6027decf6f7412fa3e1972.1616491731.git.imeevma@gmail.com> Message-ID: <21561086-ee8a-950e-5c3c-61b43dce93f6@tarantool.org> Date: Tue, 30 Mar 2021 01:08:24 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <5c19097b726f62d9ba6027decf6f7412fa3e1972.1616491731.git.imeevma@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E329498ADEA61F680B110809A4DE3E6FC56EA182A05F5380850407A3B68F81A16E612851C2DA5F5363F48A92E17214537C12C4D920E2B3C78F50E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE75C385DEB91CEC222EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F4EDC07301919F278638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CE99938B3FD79E1DF295B81B56F89867BE2E77421EECE6798A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE70F3DDF2BBF19B93A9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3253F27DA5A70FAF3117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947C0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E735CC4B623DB76FBBCBC4224003CC83647689D4C264860C145E X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2AD77751E876CB595E8F7B195E1C97831A4C110CAD6AA9239DFDF0179112761E5 X-C1DE0DAB: 0D63561A33F958A55F8EACA90ABC8A33D06DF96DF9D514FE1F11D1BCD68BE7DED59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D344E332383F80D58BB57BA0B4C9CFFB274A8DAE9F13A7641A2BCF65C14DD45812E9D091798A340FB5A1D7E09C32AA3244CD9693904BB548D191364DE7400BACF14F522A1CF68F4BE05FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojljIiQOC84rRUwkkuT3dlZQ== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822741B196373DC1B81F42AF0EFAE3566E13841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v4 47/53] sql: introduce mem_get_integer() X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for the patch! > diff --git a/src/box/sql/func.c b/src/box/sql/func.c > index b644c39d8..0fa0f6ac7 100644 > --- a/src/box/sql/func.c > +++ b/src/box/sql/func.c > @@ -1532,10 +1543,11 @@ hexFunc(sql_context * context, int argc, sql_value ** argv) > static void > zeroblobFunc(sql_context * context, int argc, sql_value ** argv) > { > - i64 n; > + int64_t n; > assert(argc == 1); > UNUSED_PARAMETER(argc); > - n = sql_value_int64(argv[0]); > + bool unused; > + mem_get_integer(argv[0], &n, &unused); The flag is never used anywhere except one assertion where you can check the integer value instead. I think you can drop this out parameter. In future we could add mem_get_int_with_sign() or something like that if necessary.