summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-09-01 01:28:08 -0400
committerMarek Olšák <[email protected]>2018-09-10 14:53:01 -0400
commitd211679017b8fe5eb0fa39762bc7f8aa05941d73 (patch)
tree568210e1c4447f18726b0065c0e6cbcfaafc2379 /src/gallium/auxiliary
parented880fe192d138c6b1115b22c306e7be9646d4a0 (diff)
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]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_inlines.h9
1 files 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