From cd2567a838fcad6c2b9f420b7727b858361ca48f Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 14 Jun 2022 16:54:22 +0200 Subject: [PATCH] drm & wayland: Remove unnecessary close() --- src/backends/drm/drm_backend.cpp | 4 ---- src/backends/wayland/wayland_backend.cpp | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/backends/drm/drm_backend.cpp b/src/backends/drm/drm_backend.cpp index c6d185de75..7c0d176f19 100644 --- a/src/backends/drm/drm_backend.cpp +++ b/src/backends/drm/drm_backend.cpp @@ -642,10 +642,6 @@ std::optional DrmBackend::testCreateDmaBuf(const QSize &size, quin } auto ret = dmaBufParamsForBo(bo); - // We are just testing to know it works and check the modifier, no need to keep the fd - for (int i = 0, c = gbm_bo_get_plane_count(bo); i < c; ++i) { - close(gbm_bo_get_fd_for_plane(bo, i)); - } gbm_bo_destroy(bo); return ret; } diff --git a/src/backends/wayland/wayland_backend.cpp b/src/backends/wayland/wayland_backend.cpp index 599dd234c7..313efc5abd 100644 --- a/src/backends/wayland/wayland_backend.cpp +++ b/src/backends/wayland/wayland_backend.cpp @@ -1036,10 +1036,6 @@ std::optional WaylandBackend::testCreateDmaBuf(const QSize &size, } auto ret = dmaBufParamsForBo(bo); - // We are just testing to know it works and check the modifier, no need to keep the fd - for (int i = 0, c = gbm_bo_get_plane_count(bo); i < c; ++i) { - close(gbm_bo_get_fd_for_plane(bo, i)); - } gbm_bo_destroy(bo); return ret; }