From 0b5146a4960fad497b2e67b561a29f751b4c4c34 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 5 Sep 2017 17:48:08 +0000 Subject: backout hard-coded behaviour change which was not discussed, in particular no justification for why the current behaviour is wrong --- app/xinit/xinit.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'app/xinit') diff --git a/app/xinit/xinit.c b/app/xinit/xinit.c index ff2b7b28f..1b049117c 100644 --- a/app/xinit/xinit.c +++ b/app/xinit/xinit.c @@ -653,14 +653,7 @@ shutdown(void) static void set_environment(void) { - char displayEnv[128]; - int ret; - - ret = snprintf(displayEnv, sizeof(displayEnv), "unix%s", displayNum); - if (ret < 0 || ret >= sizeof(displayEnv)) - Fatalx("unable to set DISPLAY"); - - if (setenv("DISPLAY", displayEnv, TRUE) == -1) + if (setenv("DISPLAY", displayNum, TRUE) == -1) Fatal("unable to set DISPLAY"); } -- cgit v1.2.3