From c00e3e3d805ff48062382f3ee3fb02c64676b4d7 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Sat, 3 Oct 2015 19:41:59 +0200 Subject: [PATCH] Some code improvements --- src/fterm.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/fterm.cpp b/src/fterm.cpp index 578e16ff..871dcb0f 100644 --- a/src/fterm.cpp +++ b/src/fterm.cpp @@ -1001,10 +1001,11 @@ void FTerm::init() background_color_erase = false; x11_button_state = 0x03; - - char const* term_env = getenv("TERM"); - if ( term_env ) // Import untrusted environment variable TERM - snprintf(termtype, sizeof(termtype), "%s", getenv("TERM")); + + // Import untrusted environment variable TERM + const char* term_env = getenv("TERM"); + if ( term_env ) + snprintf(termtype, sizeof(termtype), "%s", term_env); else strncpy (termtype, const_cast("vt100"), 6);