drm: de-indent loop in find_primary_plane

This commit is contained in:
Simon Ser 2021-07-20 21:24:52 +02:00
parent b2f016dfe5
commit 637e5341d4

View file

@ -180,7 +180,9 @@ static struct plane *find_primary_plane(struct drm_t *drm)
for (size_t i = 0; i < drm->planes.size() && ret == nullptr; i++) { for (size_t i = 0; i < drm->planes.size() && ret == nullptr; i++) {
drmModePlane *plane = drm->planes[i].plane; drmModePlane *plane = drm->planes[i].plane;
if (plane->possible_crtcs & (1 << drm->crtc_index)) { if (!(plane->possible_crtcs & (1 << drm->crtc_index)))
continue;
drmModeObjectPropertiesPtr props = drmModeObjectPropertiesPtr props =
drmModeObjectGetProperties(drm->fd, plane->plane_id, DRM_MODE_OBJECT_PLANE); drmModeObjectGetProperties(drm->fd, plane->plane_id, DRM_MODE_OBJECT_PLANE);
@ -205,7 +207,6 @@ static struct plane *find_primary_plane(struct drm_t *drm)
drmModeFreeObjectProperties(props); drmModeFreeObjectProperties(props);
} }
}
if ( ret == nullptr ) if ( ret == nullptr )
return nullptr; return nullptr;