[Spice-commits] server/red-qxl.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Mar 21 12:02:15 UTC 2019
server/red-qxl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 10870a0e0fc362883e0b52db458d6b822add1984
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Thu Mar 21 11:20:46 2019 +0100
Consistently check if drm_dma_buf_fd is greater or lower than zero
Based on a patch by Frediano Ziglio.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/red-qxl.c b/server/red-qxl.c
index 0dd26b22..789817f6 100644
--- a/server/red-qxl.c
+++ b/server/red-qxl.c
@@ -791,7 +791,7 @@ void spice_qxl_gl_scanout(QXLInstance *qxl,
pthread_mutex_lock(&qxl_state->scanout_mutex);
- if (qxl_state->scanout.drm_dma_buf_fd != -1) {
+ if (qxl_state->scanout.drm_dma_buf_fd >= 0) {
close(qxl_state->scanout.drm_dma_buf_fd);
}
@@ -832,7 +832,7 @@ void spice_qxl_gl_draw_async(QXLInstance *qxl,
spice_return_if_fail(qxl != NULL);
qxl_state = qxl->st;
- if (qxl_state->scanout.drm_dma_buf_fd == -1) {
+ if (qxl_state->scanout.drm_dma_buf_fd < 0) {
spice_warning("called spice_qxl_gl_draw_async without a buffer");
red_qxl_async_complete(qxl, cookie);
return;
More information about the Spice-commits
mailing list