From: Marek Olšák Date: Sat, 1 Sep 2018 05:28:08 +0000 (-0400) Subject: gallium/u_inlines: remove the destroy variable in pipe_reference_described X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d211679017b8fe5eb0fa39762bc7f8aa05941d73;p=mesa.git gallium/u_inlines: remove the destroy variable in pipe_reference_described Reviewed-by: Michel Dänzer Tested-by: Dieter Nützel --- diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index 820d3080a5c..b06fb111709 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -74,8 +74,6 @@ pipe_reference_described(struct pipe_reference *dst, struct pipe_reference *src, debug_reference_descriptor get_desc) { - boolean destroy = FALSE; - if (dst != src) { /* bump the src.count first */ if (src) { @@ -87,14 +85,13 @@ pipe_reference_described(struct pipe_reference *dst, if (dst) { int count = p_atomic_dec_return(&dst->count); assert(count != -1); /* dst had to be referenced */ - if (!count) - destroy = TRUE; - debug_reference(dst, get_desc, -1); + if (!count) + return true; } } - return destroy; + return false; } static inline boolean