constify help_cmd
authorTom Tromey <tromey@redhat.com>
Mon, 21 Jul 2014 23:35:10 +0000 (17:35 -0600)
committerTom Tromey <tromey@redhat.com>
Thu, 24 Jul 2014 17:30:03 +0000 (11:30 -0600)
This constifies help_cmd.

2014-07-24  Tom Tromey  <tromey@redhat.com>

* cli/cli-decode.c (help_cmd): Make parameter "const".
* cli/cli-decode.h (help_cmd): Update.

gdb/ChangeLog
gdb/cli/cli-decode.c
gdb/cli/cli-decode.h

index 3cd0df6..1a20220 100644 (file)
@@ -1,5 +1,10 @@
 2014-07-24  Tom Tromey  <tromey@redhat.com>
 
+       * cli/cli-decode.c (help_cmd): Make parameter "const".
+       * cli/cli-decode.h (help_cmd): Update.
+
+2014-07-24  Tom Tromey  <tromey@redhat.com>
+
        * stack.c (up_silently_base, down_silently_base): Make argument
        const.
 
index f09b777..fcd4ceb 100644 (file)
@@ -936,10 +936,9 @@ apropos_cmd (struct ui_file *stream,
    help_list.  */
 
 void
-help_cmd (char *arg, struct ui_file *stream)
+help_cmd (const char *command, struct ui_file *stream)
 {
   struct cmd_list_element *c;
-  const char *command = arg;
 
   if (!command)
     {
index c6edc87..48ed604 100644 (file)
@@ -216,7 +216,7 @@ extern void help_cmd_list (struct cmd_list_element *, enum command_class,
 
 /* Functions that implement commands about CLI commands.  */
 
-extern void help_cmd (char *, struct ui_file *);
+extern void help_cmd (const char *, struct ui_file *);
 
 extern void apropos_cmd (struct ui_file *, struct cmd_list_element *,
                          struct re_pattern_buffer *, char *);