[rtems commit] shell: Fix rtems_shell_init_env()

Sebastian Huber sebh at rtems.org
Mon Mar 12 10:25:04 UTC 2018


Module:    rtems
Branch:    master
Commit:    2cec5acdf2c8470bb6e78cc83dd64b5e3258d30a
Changeset: http://git.rtems.org/rtems/commit/?id=2cec5acdf2c8470bb6e78cc83dd64b5e3258d30a

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Mar 12 10:29:21 2018 +0100

shell: Fix rtems_shell_init_env()

Do not discard a user provided task name in rtems_shell_init_env().

---

 cpukit/libmisc/shell/shell.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c
index 5f042f5..b6aae78 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;
 }



More information about the vc mailing list