keyboard_indicators: Clean up opening display
Aaron Marcher me@drkhsh.at
Wed, 02 May 2018 08:26:23 +0200
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
components/keyboard_indicators.c
→
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; }