[PATCH weston v5 2/3] simple-dmabuf-drm: simplify fd_map_bo

Guido Günther agx at sigxcpu.org
Tue Mar 20 08:41:59 UTC 2018


Signed-off-by: Guido Günther <agx at sigxcpu.org>
---
 clients/simple-dmabuf-drm.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/clients/simple-dmabuf-drm.c b/clients/simple-dmabuf-drm.c
index 19e8dbb1..cb04622f 100644
--- a/clients/simple-dmabuf-drm.c
+++ b/clients/simple-dmabuf-drm.c
@@ -251,11 +251,7 @@ static int
 fd_map_bo(struct buffer *buf)
 {
 	buf->mmap = fd_bo_map(buf->fd_bo);
-
-	if (buf->mmap != NULL)
-		return 1;
-
-	return 0;
+	return buf->mmap != NULL;
 }
 
 static void
-- 
2.16.1



More information about the wayland-devel mailing list