[gdm] gdm-x-session: drop spurious g_getenv call
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] gdm-x-session: drop spurious g_getenv call
- Date: Wed, 22 Jul 2015 13:20:47 +0000 (UTC)
commit 752043cc3670928c90211fcfc9df4b8092e1c3d2
Author: Ray Strode <rstrode redhat com>
Date: Wed Jul 22 09:19:02 2015 -0400
gdm-x-session: drop spurious g_getenv call
We call g_getenv("XDG_VTNR") twice in a row, when
the result the first time around is stored in the vt
variable.
This commit just uses the vt variable again, and
avoids the second call.
https://bugzilla.gnome.org/show_bug.cgi?id=752724
daemon/gdm-x-session.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c
index f8eeb45..58646fa 100644
--- a/daemon/gdm-x-session.c
+++ b/daemon/gdm-x-session.c
@@ -516,7 +516,7 @@ spawn_session (State *state,
vt = g_getenv ("XDG_VTNR");
if (vt != NULL) {
- g_subprocess_launcher_setenv (launcher, "WINDOWPATH", g_getenv ("XDG_VTNR"), TRUE);
+ g_subprocess_launcher_setenv (launcher, "WINDOWPATH", vt, TRUE);
}
if (run_script) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]