From 421e92be59d4c48e23b5db901bc11a4b8abbf45f Mon Sep 17 00:00:00 2001 From: Peng Liu Date: Thu, 24 Oct 2024 09:06:22 +0800 Subject: [PATCH] backend/x11: delete xcb conn check NULL xcb_connect always returns a non-NULL pointer to a xcb_connection_t, even on failure. Signed-off-by: Peng Liu --- backend/x11/backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/x11/backend.c b/backend/x11/backend.c index 31ed2aaf..a265c2a6 100644 --- a/backend/x11/backend.c +++ b/backend/x11/backend.c @@ -409,7 +409,7 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_event_loop *loop, wl_list_init(&x11->outputs); x11->xcb = xcb_connect(x11_display, NULL); - if (!x11->xcb || xcb_connection_has_error(x11->xcb)) { + if (xcb_connection_has_error(x11->xcb)) { wlr_log(WLR_ERROR, "Failed to open xcb connection"); goto error_x11; }