aboutsummaryrefslogtreecommitdiff
path: root/dmenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/dmenu.c b/dmenu.c
index 0faa02e..4d23d9d 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -728,8 +728,7 @@ main(int argc, char *argv[]) {
eprint("usage: dmenu [-i] [-b] [-fn <font>] [-nb <color>] [-nf <color>]\n"
" [-p <prompt>] [-sb <color>] [-sf <color>] [-v]\n");
setlocale(LC_CTYPE, "");
- dpy = XOpenDisplay(0);
- if(!dpy)
+ if(!(dpy = XOpenDisplay(0)))
eprint("dmenu: cannot open display\n");
screen = DefaultScreen(dpy);
root = RootWindow(dpy, screen);