[Mesa-dev] [PATCH 1/1] winsys: Fix always false comparison

Jan Vesely jan.vesely at rutgers.edu
Fri Jun 24 22:40:14 UTC 2016


Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
 src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
index 21ac0d7..c68e1366 100644
--- a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
+++ b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
@@ -230,7 +230,7 @@ kms_sw_displaytarget_add_from_prime(struct kms_sw_winsys *kms_sw, int fd)
    kms_sw_dt->handle = handle;
    kms_sw_dt->size = lseek(fd, 0, SEEK_END);
 
-   if (kms_sw_dt->size == (off_t)-1) {
+   if (kms_sw_dt->size == (unsigned)(off_t)-1) {
       FREE(kms_sw_dt);
       return NULL;
    }
-- 
2.7.4



More information about the mesa-dev mailing list