[Tarantool-patches] [PATCH 09/11] qsync: drop redundant type convention

Serge Petrenko sergepetrenko at tarantool.org
Fri Nov 13 13:11:05 MSK 2020


12.11.2020 22:51, Cyrill Gorcunov пишет:
> Void pointer can be cast implicitly.

We usually use explicit casts. Check `applier.cc`, `alter.cc` and some 
other places.
This isn't in our style guide though, so I'm fine with the change.

Let's see what Vlad has to say.

>
> Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
> ---
>   src/box/txn_limbo.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
> index cf6122360..ffcda389c 100644
> --- a/src/box/txn_limbo.c
> +++ b/src/box/txn_limbo.c
> @@ -549,8 +549,7 @@ static int
>   txn_commit_cb(struct trigger *trigger, void *event)
>   {
>   	(void)event;
> -	struct confirm_waitpoint *cwp =
> -		(struct confirm_waitpoint *)trigger->data;
> +	struct confirm_waitpoint *cwp = trigger->data;
>   	cwp->is_confirm = true;
>   	fiber_wakeup(cwp->caller);
>   	return 0;
> @@ -560,8 +559,7 @@ static int
>   txn_rollback_cb(struct trigger *trigger, void *event)
>   {
>   	(void)event;
> -	struct confirm_waitpoint *cwp =
> -		(struct confirm_waitpoint *)trigger->data;
> +	struct confirm_waitpoint *cwp = trigger->data;
>   	cwp->is_rollback = true;
>   	fiber_wakeup(cwp->caller);
>   	return 0;

-- 
Serge Petrenko



More information about the Tarantool-patches mailing list