# HG changeset patch # User Chong Yidong # Date 1142696519 0 # Node ID 1ea752831737d44dcbaee6827c617f420802d5a5 # Parent 0ab713e3e8124060bf480730d381ac292959fc39 * xterm.c (x_display_ok): Fix minor bug and compilation warnings. diff -r 0ab713e3e812 -r 1ea752831737 src/ChangeLog --- 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 + + * xterm.c (x_display_ok): Fix minor bug and compilation warnings. + 2006-03-18 Nozomu Ando * m/pmax.h (BROKEN_NOCOMBRELOC) [__NetBSD__]: Define. diff -r 0ab713e3e812 -r 1ea752831737 src/xterm.c --- 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)))