[hackers] [slstatus] keyboard_indicators: Clean up opening display || Aaron Marcher

From: <git_AT_suckless.org>
Date: Wed, 2 May 2018 08:26:47 +0200 (CEST)

commit 7c11f890a5296ddd527ca956503bb33ceacd3ca9
Author: Aaron Marcher <me_AT_drkhsh.at>
AuthorDate: Wed May 2 08:26:23 2018 +0200
Commit: Aaron Marcher <me_AT_drkhsh.at>
CommitDate: Wed May 2 08:26:23 2018 +0200

    keyboard_indicators: Clean up opening display

diff --git a/components/keyboard_indicators.c b/components/keyboard_indicators.c
index 76cf17e..ed4bc17 100644
--- a/components/keyboard_indicators.c
+++ b/components/keyboard_indicators.c
_AT_@ -7,10 +7,10 @@
 const char *
 keyboard_indicators(void)
 {
- Display *dpy = XOpenDisplay(NULL);
+ Display *dpy;
         XKeyboardState state;
 
- if (dpy == NULL) {
+ if (!(dpy = XOpenDisplay(NULL))) {
                 fprintf(stderr, "Cannot open display\n");
                 return NULL;
         }
Received on Wed May 02 2018 - 08:26:47 CEST

This archive was generated by hypermail 2.3.0 : Wed May 02 2018 - 08:36:39 CEST