gallium/pipebuffer: fix parenthesis location
authorTimothy Arceri <tarceri@itsqueeze.com>
Sat, 31 Mar 2018 23:32:28 +0000 (09:32 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 3 Apr 2018 06:05:59 +0000 (16:05 +1000)
Without this the return value will never get set to -1. This
was first added in 49866c8f3457 and copied in 2b396eeed983.

Fixes: 2b396eeed983 "gallium/pb_cache: add a copy of cache bufmgr independent of pb_manager"
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102342

src/gallium/auxiliary/pipebuffer/pb_cache.c

index 0aaedbfae4ccbb58f08cd26b8e29acccd3320ad6..2b9ad4980458bcb0b252ad0375c5f26662f2c96c 100644 (file)
@@ -169,7 +169,7 @@ pb_cache_reclaim_buffer(struct pb_cache *mgr, pb_size size,
       cur_entry = LIST_ENTRY(struct pb_cache_entry, cur, head);
 
       if (!entry && (ret = pb_cache_is_buffer_compat(cur_entry, size,
-                                                     alignment, usage) > 0))
+                                                     alignment, usage)) > 0)
          entry = cur_entry;
       else if (os_time_timeout(cur_entry->start, cur_entry->end, now))
          destroy_buffer_locked(cur_entry);