mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-21 14:42:25 +00:00
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 <liupeng01@kylinos.cn>
This commit is contained in:
parent
da8f7a07ba
commit
0ba1982488
@ -409,7 +409,7 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_event_loop *loop,
|
|||||||
wl_list_init(&x11->outputs);
|
wl_list_init(&x11->outputs);
|
||||||
|
|
||||||
x11->xcb = xcb_connect(x11_display, NULL);
|
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");
|
wlr_log(WLR_ERROR, "Failed to open xcb connection");
|
||||||
goto error_x11;
|
goto error_x11;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user