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 2E42E6C7D2; Sat, 30 Jan 2021 22:18:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2E42E6C7D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1612034310; bh=G7+gBBSe13104fqMeka5nKddK23I0EfKnC+7yAuWVLE=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=cEUnDZLtvdQZDIDcyinsuQMdWdNi+ROvmvc/Jfiw8GQwZ/vmbLrvBKhlnzQ9c5jsf pN/LWnRcAhdkG8VUTTuN17Squktt2q0+BKW8GFdHjsZaQk5vhCkVN0onQcPpsUh+Yp tQ99ruG1/mkIxB/cZ85yIiIMtdvChhMR5f2hAVFw= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 DA8AD68713 for ; Sat, 30 Jan 2021 22:18:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DA8AD68713 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1l5vkt-00031V-Qc; Sat, 30 Jan 2021 22:18:00 +0300 To: Cyrill Gorcunov , tml References: <20210122132700.272816-1-gorcunov@gmail.com> <20210122132700.272816-6-gorcunov@gmail.com> Message-ID: Date: Sat, 30 Jan 2021 20:17:59 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210122132700.272816-6-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD953AC099BC0052A9CD238BCF93DF237168F57FB2D6D655B83182A05F538085040521AFB31E5CF1B2F0DFC4444C4F35CC79CDB470414765176B39380E9FC36CC2D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A1E06C56A402FD6FEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AF78C68CB7D402738638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCE311601C3C2B550F1ECEA0AEEEAC6A3A2B1CF31CBC59C1BA389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C02F11D39E7306DD338941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6E232F00D8D26902CA471835C12D1D977C4224003CC836476EC64975D915A344093EC92FD9297F6718AA50765F7900637742364C369F68A8BA7F4EDE966BC389F395957E7521B51C24C7702A67D5C33162DBA43225CD8A89F00AD5422731CA18CCE5475246E174218B5C8C57E37DE458B4C7702A67D5C3316FA3894348FB808DBE5FF2EAB69DB47CC574AF45C6390F7469DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A57ABA33AE73AADCEB0DA613AF7F5AD5D32D8478BCE4F1E673D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A5970F8A4685C8AB6B18DAC5B16BD61CFEB42EAFA0327BBCEE15C014B4B2A57EDB8D0E350A4FDC961D7E09C32AA3244CA8DBAFABF665E3840CA2AD746A38EBA9A8CE788DE6831205927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojBjC2XHTqRV19ldLOddyAWg== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822BA6303B0B5081DB3F149C7ABE50EE2DC3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 5/6] txn: stop using txn_has_flag 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! On 22.01.2021 14:26, Cyrill Gorcunov wrote: > Part-of #5128 > > Signed-off-by: Cyrill Gorcunov > --- > src/box/txn.c | 39 +++++++++++++++++++-------------------- > src/box/txn.h | 2 +- > src/box/txn_limbo.c | 26 +++++++++++++------------- > 3 files changed, 33 insertions(+), 34 deletions(-) > > diff --git a/src/box/txn.c b/src/box/txn.c > index 6197cf012..d1964b5f7 100644 > --- a/src/box/txn.c > +++ b/src/box/txn.c > @@ -526,7 +526,7 @@ txn_free_or_wakeup(struct txn *txn) > void > txn_complete_fail(struct txn *txn) > { > - assert(!txn_has_flag(txn, TXN_IS_DONE)); > + assert(!(txn->flags & TXN_IS_DONE)); Please, use explicit != 0. We don't apply '!' operator to non-boolean values. The same in other places. This I can even find in the code style guide: https://github.com/tarantool/tarantool/wiki/Code-review-procedure#code-style