summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorAaron Marcher <me@drkhsh.at>2018-05-02 08:26:23 +0200
committerAaron Marcher <me@drkhsh.at>2018-05-02 08:26:23 +0200
commit7c11f890a5296ddd527ca956503bb33ceacd3ca9 (patch)
treeab05d26a48d9ddaadbb1f54e392f2c633db52a25 /components
parentb2b6eb638eadcdd5ea091d74f65b1c0a97e0df0a (diff)
keyboard_indicators: Clean up opening display
Diffstat (limited to 'components')
-rw-r--r--components/keyboard_indicators.c4
1 files changed, 2 insertions, 2 deletions
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
@@ -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;
}