From: SegFault42 Date: Sun, 11 Feb 2018 23:48:28 +0000 (+0100) Subject: return value corrected X-Git-Tag: 2.11~5^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F177%2Fhead;p=i3%2Fi3lock return value corrected --- 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. */