From d211679017b8fe5eb0fa39762bc7f8aa05941d73 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 1 Sep 2018 01:28:08 -0400 Subject: [PATCH] gallium/u_inlines: remove the destroy variable in pipe_reference_described MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Michel Dänzer Tested-by: Dieter Nützel --- src/gallium/auxiliary/util/u_inlines.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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 -- 2.30.2