From 8c328f1106cf0498333c2d8a96940e7b4581e316 Mon Sep 17 00:00:00 2001 From: hasso Date: Tue, 5 Oct 2004 21:01:23 +0000 Subject: Number of warnings is down to 3 again in lib directory. A lot of const's added to strings and a lot of int -> unsigned int changes. --- lib/command.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/command.h') diff --git a/lib/command.h b/lib/command.h index d1648d68..66883fbb 100644 --- a/lib/command.h +++ b/lib/command.h @@ -60,7 +60,7 @@ struct host int encrypt; /* Banner configuration. */ - char *motd; + const char *motd; }; /* There are some command levels which called from command node. */ @@ -113,7 +113,7 @@ struct cmd_node enum node_type node; /* Prompt character at vty interface. */ - char *prompt; + const char *prompt; /* Is this node's configuration goes to vtysh ? */ int vtysh; @@ -128,12 +128,12 @@ struct cmd_node /* Structure of command element. */ struct cmd_element { - char *string; /* Command specification by string. */ + const char *string; /* Command specification by string. */ int (*func) (struct cmd_element *, struct vty *, int, char **); - char *doc; /* Documentation of this command. */ + const char *doc; /* Documentation of this command. */ int daemon; /* Daemon to which this command belong. */ vector strvec; /* Pointing out each description vector. */ - int cmdsize; /* Command index count. */ + unsigned int cmdsize; /* Command index count. */ char *config; /* Configuration string */ vector subconfig; /* Sub configuration string */ }; @@ -141,8 +141,8 @@ struct cmd_element /* Command description structure. */ struct desc { - char *cmd; /* Command string. */ - char *str; /* Command's description. */ + const char *cmd; /* Command string. */ + const char *str; /* Command's description. */ }; /* Return value of the commands. */ @@ -291,7 +291,7 @@ vector cmd_make_strvec (char *); void cmd_free_strvec (vector); vector cmd_describe_command (); char **cmd_complete_command (); -char *cmd_prompt (enum node_type); +const char *cmd_prompt (enum node_type); int config_from_file (struct vty *, FILE *); int cmd_execute_command (vector, struct vty *, struct cmd_element **); int cmd_execute_command_strict (vector, struct vty *, struct cmd_element **); -- cgit v1.2.1