1
1

* Code cleanup: Added const qualifier for variables and

function declarations where possible. Additionally wrapped
	the calls to putenv() by g_strdup().
Этот коммит содержится в:
Roland Illig 2004-08-29 23:59:17 +00:00
родитель 3f3c24f511
Коммит 7bff9337c0

Просмотреть файл

@ -161,7 +161,7 @@ static void
init_subshell_child (const char *pty_name) init_subshell_child (const char *pty_name)
{ {
int pty_slave; int pty_slave;
char *init_file = NULL; const char *init_file = NULL;
#ifdef HAVE_GETSID #ifdef HAVE_GETSID
pid_t mc_sid; pid_t mc_sid;
#endif /* HAVE_GETSID */ #endif /* HAVE_GETSID */
@ -219,7 +219,7 @@ init_subshell_child (const char *pty_name)
char sid_str[BUF_SMALL]; char sid_str[BUF_SMALL];
g_snprintf (sid_str, sizeof (sid_str), "MC_SID=%ld", g_snprintf (sid_str, sizeof (sid_str), "MC_SID=%ld",
(long) mc_sid); (long) mc_sid);
putenv (sid_str); putenv (g_strdup (sid_str));
} }
#endif /* HAVE_GETSID */ #endif /* HAVE_GETSID */
@ -230,11 +230,11 @@ init_subshell_child (const char *pty_name)
init_file = ".bashrc"; init_file = ".bashrc";
/* Make MC's special commands not show up in bash's history */ /* Make MC's special commands not show up in bash's history */
putenv ("HISTCONTROL=ignorespace"); putenv (g_strdup ("HISTCONTROL=ignorespace"));
/* Allow alternative readline settings for MC */ /* Allow alternative readline settings for MC */
if (access (".mc/inputrc", R_OK) == 0) if (access (".mc/inputrc", R_OK) == 0)
putenv ("INPUTRC=.mc/inputrc"); putenv (g_strdup ("INPUTRC=.mc/inputrc"));
break; break;