summaryrefslogtreecommitdiff
path: root/progs/xdemos/glxcontexts.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/xdemos/glxcontexts.c')
-rw-r--r--progs/xdemos/glxcontexts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/progs/xdemos/glxcontexts.c b/progs/xdemos/glxcontexts.c
index fbc296ef62..a9ff326ed5 100644
--- a/progs/xdemos/glxcontexts.c
+++ b/progs/xdemos/glxcontexts.c
@@ -587,8 +587,8 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n",
- dpyName ? dpyName : getenv("DISPLAY"));
+ fprintf(stderr, "Error: couldn't open display %s\n",
+ XDisplayName(dpyName));
return -1;
}