keyboard_indicators: Clean up opening display
This commit is contained in:
parent
b2b6eb638e
commit
7c11f890a5
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue