From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 048EC445324 for ; Fri, 10 Jul 2020 10:56:47 +0300 (MSK) Received: by mail-lf1-f67.google.com with SMTP id c11so2679904lfh.8 for ; Fri, 10 Jul 2020 00:56:47 -0700 (PDT) From: Cyrill Gorcunov Date: Fri, 10 Jul 2020 10:56:03 +0300 Message-Id: <20200710075605.217824-4-gorcunov@gmail.com> In-Reply-To: <20200710075605.217824-1-gorcunov@gmail.com> References: <20200710075605.217824-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 3/5] qsync: txn_commit_async -- drop redundant variable List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Cc: Vladislav Shpilevoy Flag test is enough no need for additional variable. And move limbo_entry declaration into the scope where it belongs. Signed-off-by: Cyrill Gorcunov --- src/box/txn.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/box/txn.c b/src/box/txn.c index 4251b2092..613eb7aef 100644 --- a/src/box/txn.c +++ b/src/box/txn.c @@ -732,9 +732,8 @@ txn_commit_async(struct txn *txn) return -1; } - bool is_sync = txn_has_flag(txn, TXN_WAIT_SYNC); - struct txn_limbo_entry *limbo_entry; - if (is_sync) { + if (txn_has_flag(txn, TXN_WAIT_SYNC)) { + struct txn_limbo_entry *limbo_entry; /* * We'll need this trigger for sync transactions later, * but allocation failure is inappropriate after the entry -- 2.26.2