Module: Mesa Branch: master Commit: d211679017b8fe5eb0fa39762bc7f8aa05941d73 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d211679017b8fe5eb0fa39762bc7f8aa05941d73
Author: Marek Olšák <[email protected]> Date: Sat Sep 1 01:28:08 2018 -0400 gallium/u_inlines: remove the destroy variable in pipe_reference_described Reviewed-by: Michel Dänzer <[email protected]> Tested-by: Dieter Nützel <[email protected]> --- 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 820d3080a5..b06fb11170 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 _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
