diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c index 5f042f5855..b6aae781c5 100644 --- a/cpukit/libmisc/shell/shell.c +++ b/cpukit/libmisc/shell/shell.c @@ -74,10 +74,10 @@ static rtems_shell_env_t *rtems_shell_init_env( return NULL; if ( !shell_env_p ) { *shell_env = rtems_global_shell_env; + shell_env->taskname = NULL; } else { *shell_env = *shell_env_p; } - shell_env->taskname = NULL; return shell_env; }