From a0b1329ee6cce22aca0c9b064fe9c136cc05d630 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 4 Jan 2024 22:24:06 +0100 Subject: Fix bool return types This makes wlroots build in C23 mode. C23 is more strict and rejects implicit conversions from bool to a pointer. --- backend/x11/backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend') diff --git a/backend/x11/backend.c b/backend/x11/backend.c index fcaab618..5c5aa7e8 100644 --- a/backend/x11/backend.c +++ b/backend/x11/backend.c @@ -600,7 +600,7 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display, if (!query_formats(x11)) { wlr_log(WLR_ERROR, "Failed to query supported DRM formats"); - return false; + goto error_event; } x11->drm_fd = -1; @@ -637,7 +637,7 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display, #if HAVE_XCB_ERRORS if (xcb_errors_context_new(x11->xcb, &x11->errors_context) != 0) { wlr_log(WLR_ERROR, "Failed to create error context"); - return false; + goto error_event; } #endif -- cgit v1.2.3