diff options
author | Fabio Estevam <[email protected]> | 2017-04-17 19:36:40 -0300 |
---|---|---|
committer | Christian Gmeiner <[email protected]> | 2017-04-22 17:48:35 +0200 |
commit | 53e39f6df47fcfc19f36e425c0f880a9b1a2a7d6 (patch) | |
tree | 4ec5a9ce7d03c4c211ee6f030117052f10a843dd /src/gallium/drivers | |
parent | e769349fc619b7141ed9ba6189d3ed5933527190 (diff) |
etnaviv: etnaviv_fence: Simplify the return code logic
The return code can be simplified by using the logical not operator.
Signed-off-by: Fabio Estevam <[email protected]>
Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_fence.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_fence.c b/src/gallium/drivers/etnaviv/etnaviv_fence.c index 65402aaa3bd..d82708eacbe 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_fence.c +++ b/src/gallium/drivers/etnaviv/etnaviv_fence.c @@ -65,10 +65,8 @@ static boolean etna_screen_fence_finish(struct pipe_screen *pscreen, struct pipe_context *ctx, struct pipe_fence_handle *fence, uint64_t timeout) { - if (fence->fence_fd != -1) { - int ret = sync_wait(fence->fence_fd, timeout / 1000000); - return ret == 0; - } + if (fence->fence_fd != -1) + return !sync_wait(fence->fence_fd, timeout / 1000000); if (etna_pipe_wait_ns(fence->screen->pipe, fence->timestamp, timeout)) return false; |