]> git.sur5r.net Git - i3/i3lock/commitdiff
return value corrected 177/head
authorSegFault42 <SegFault42@protonmail.com>
Sun, 11 Feb 2018 23:48:28 +0000 (00:48 +0100)
committerSegFault42 <SegFault42@protonmail.com>
Sun, 11 Feb 2018 23:48:28 +0000 (00:48 +0100)
i3lock.c

index c0da457a0851fae1757158ba4eeb3a8018bf8086..2bf3901bf82a792a9666653d7c99046b74975e50 100644 (file)
--- 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;
 
     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. */
         errx(EXIT_FAILURE, "Cannot open display\n");
 
     /* We need to know about the window being obscured or getting destroyed. */