[Tarantool-patches] [PATCH 5/6] txn: stop using txn_has_flag
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Sat Jan 30 22:17:59 MSK 2021
Thanks for the patch!
On 22.01.2021 14:26, Cyrill Gorcunov wrote:
> Part-of #5128
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
> ---
> 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
More information about the Tarantool-patches
mailing list