changeset 69566:1ea752831737

* xterm.c (x_display_ok): Fix minor bug and compilation warnings.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 18 Mar 2006 15:41:59 +0000
parents 0ab713e3e812
children be544ed33d82
files src/ChangeLog src/xterm.c
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sat Mar 18 15:12:38 2006 +0000
+++ b/src/ChangeLog	Sat Mar 18 15:41:59 2006 +0000
@@ -1,3 +1,7 @@
+2006-03-18  Chong Yidong  <cyd@stupidchicken.com>
+
+	* xterm.c (x_display_ok): Fix minor bug and compilation warnings.
+
 2006-03-18  Nozomu Ando  <nand@mac.com>
 
 	* m/pmax.h (BROKEN_NOCOMBRELOC) [__NetBSD__]: Define.
--- a/src/xterm.c	Sat Mar 18 15:12:38 2006 +0000
+++ b/src/xterm.c	Sat Mar 18 15:41:59 2006 +0000
@@ -10122,9 +10122,10 @@
 {
     int dpy_ok = 1;
     Display *dpy;
-    char *display_name = display || getenv("DISPLAY");
-
-    if (!display_name)
+
+    if (!display)
+      display = getenv("DISPLAY");
+    if (!display)
       return 0;
 
     if ((dpy = XOpenDisplay (display)))