summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorhasso <hasso>2004-10-07 21:32:14 +0000
committerhasso <hasso>2004-10-07 21:32:14 +0000
commitea8e9d972e8775f3e1c4e03fbacb18a42e8c4177 (patch)
tree0762c5ca1ae795080fb5ec9bc6cb54bffcc02748 /lib/command.c
parente561a8eb365a77beb0dd1c4ac406f9de21543a74 (diff)
Even more const strings and fix to bugfix.
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/command.c b/lib/command.c
index 330470e5..2766a357 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -167,9 +167,10 @@ sort_node ()
character is separated by a space character. Return value is a
vector which includes char ** data element. */
vector
-cmd_make_strvec (char *string)
+cmd_make_strvec (const char *string)
{
- char *cp, *start, *token;
+ const char *cp, *start;
+ char *token;
int strlen;
vector strvec;
@@ -3303,9 +3304,13 @@ cmd_init (int terminal)
install_element (ENABLE_NODE, &config_terminal_no_length_cmd);
install_default (CONFIG_NODE);
+ }
+
+ install_element (CONFIG_NODE, &hostname_cmd);
+ install_element (CONFIG_NODE, &no_hostname_cmd);
- install_element (CONFIG_NODE, &hostname_cmd);
- install_element (CONFIG_NODE, &no_hostname_cmd);
+ if (terminal)
+ {
install_element (CONFIG_NODE, &password_cmd);
install_element (CONFIG_NODE, &password_text_cmd);
install_element (CONFIG_NODE, &enable_password_cmd);