From 7a80375e1f1d09e0671912c19284a2669d4f9063 Mon Sep 17 00:00:00 2001 From: SegFault42 Date: Mon, 12 Feb 2018 00:48:28 +0100 Subject: [PATCH] return value corrected --- i3lock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/i3lock.c b/i3lock.c index c0da457..2bf3901 100644 --- a/i3lock.c +++ b/i3lock.c @@ -807,8 +807,7 @@ static void raise_loop(xcb_window_t window) { xcb_generic_event_t *event; int screens; - if ((conn = xcb_connect(NULL, &screens)) == NULL || - xcb_connection_has_error(conn)) + if (xcb_connection_has_error((conn = xcb_connect(NULL, &screens))) > 0) errx(EXIT_FAILURE, "Cannot open display\n"); /* We need to know about the window being obscured or getting destroyed. */ -- 2.39.2