summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/winsys/virgl/drm/virgl_drm_winsys.c2
-rw-r--r--src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
index d77ebd6ca15..b5d4435e5e6 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
@@ -309,7 +309,7 @@ virgl_drm_winsys_resource_cache_create(struct virgl_winsys *qws,
while (curr != &qdws->delayed) {
curr_res = LIST_ENTRY(struct virgl_hw_res, curr, head);
- if (!res && (ret = virgl_is_res_compat(qdws, curr_res, size, bind, format) > 0))
+ if (!res && ((ret = virgl_is_res_compat(qdws, curr_res, size, bind, format)) > 0))
res = curr_res;
else if (os_time_timeout(curr_res->start, curr_res->end, now)) {
LIST_DEL(&curr_res->head);
diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
index b19c4561493..9c9ec044591 100644
--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
+++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
@@ -343,7 +343,7 @@ virgl_vtest_winsys_resource_cache_create(struct virgl_winsys *vws,
while (curr != &vtws->delayed) {
curr_res = LIST_ENTRY(struct virgl_hw_res, curr, head);
- if (!res && (ret = virgl_is_res_compat(vtws, curr_res, size, bind, format) > 0))
+ if (!res && ((ret = virgl_is_res_compat(vtws, curr_res, size, bind, format)) > 0))
res = curr_res;
else if (os_time_timeout(curr_res->start, curr_res->end, now)) {
LIST_DEL(&curr_res->head);