From 64669f3b4bab4096df75b7279c5b2d0a4784b835 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 21 Jul 2014 17:35:10 -0600 Subject: [PATCH] constify help_cmd This constifies help_cmd. 2014-07-24 Tom Tromey * cli/cli-decode.c (help_cmd): Make parameter "const". * cli/cli-decode.h (help_cmd): Update. --- gdb/ChangeLog | 5 +++++ gdb/cli/cli-decode.c | 3 +-- gdb/cli/cli-decode.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3cd0df695ea..1a20220bd3d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-07-24 Tom Tromey + + * cli/cli-decode.c (help_cmd): Make parameter "const". + * cli/cli-decode.h (help_cmd): Update. + 2014-07-24 Tom Tromey * stack.c (up_silently_base, down_silently_base): Make argument diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index f09b7777548..fcd4cebfc65 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -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) { diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h index c6edc87198f..48ed604735b 100644 --- a/gdb/cli/cli-decode.h +++ b/gdb/cli/cli-decode.h @@ -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 *); -- 2.30.2