From 5bc98e5269423c49d5543079c824f551db4028f0 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 27 Mar 2013 10:35:35 -0600 Subject: [PATCH] constify parse_cli_boolean_value This changes a parameter of parse_cli_boolean_value to be const. 2014-06-18 Tom Tromey * cli/cli-setshow.h (parse_cli_boolean_value): Update. * cli/cli-setshow.c (parse_cli_boolean_value): Make "arg" const. --- gdb/ChangeLog | 5 +++++ gdb/cli/cli-setshow.c | 2 +- gdb/cli/cli-setshow.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8a7d30cef1d..3990129f71e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-06-18 Tom Tromey + + * cli/cli-setshow.h (parse_cli_boolean_value): Update. + * cli/cli-setshow.c (parse_cli_boolean_value): Make "arg" const. + 2014-06-18 Tom Tromey * probe.c (info_probes_for_ops): Make "arg" const. diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 75f15262c1a..d14d3614f70 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -76,7 +76,7 @@ parse_auto_binary_operation (const char *arg) /* See cli-setshow.h. */ int -parse_cli_boolean_value (char *arg) +parse_cli_boolean_value (const char *arg) { int length; diff --git a/gdb/cli/cli-setshow.h b/gdb/cli/cli-setshow.h index a41a66d048c..a68d610c29e 100644 --- a/gdb/cli/cli-setshow.h +++ b/gdb/cli/cli-setshow.h @@ -21,7 +21,7 @@ struct cmd_list_element; /* Parse ARG, an option to a boolean variable. Returns 1 for true, 0 for false, and -1 if invalid. */ -extern int parse_cli_boolean_value (char *arg); +extern int parse_cli_boolean_value (const char *arg); extern void do_set_command (char *arg, int from_tty, struct cmd_list_element *c); -- 2.30.2