diff options
Diffstat (limited to 'cpukit/libmisc/shell/shell_cmdset.c')
-rw-r--r-- | cpukit/libmisc/shell/shell_cmdset.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/cpukit/libmisc/shell/shell_cmdset.c b/cpukit/libmisc/shell/shell_cmdset.c index be64b83fe4..89a6aeb32b 100644 --- a/cpukit/libmisc/shell/shell_cmdset.c +++ b/cpukit/libmisc/shell/shell_cmdset.c @@ -1,10 +1,11 @@ +/** + * @file + * + * @brief Shell Command Set Management + */ + /* - * - * Shell Command Set Management - * - * Author: - * WORK: fernando.ruiz@ctv.es - * HOME: correo@fernando-ruiz.com + * Copyright (c) 2001 Fernando Ruiz Casas <fruizcasas@gmail.com> * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -112,6 +113,11 @@ rtems_shell_cmd_t *rtems_shell_add_cmd_struct( rtems_shell_cmd_t **next_ptr = &rtems_shell_first_cmd; rtems_shell_cmd_t *existing; + if (shell_cmd == NULL) + return NULL; + if (shell_cmd->name == NULL) + return NULL; + /* * Iterate through all commands and check if a command with this name is * already present. |