aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2024-09-26 17:06:50 -0600
committerTom Tromey <tom@tromey.com>2024-09-26 17:06:50 -0600
commit92aac466fb204a866ee3fbf65842099ed07a7c08 (patch)
tree8f43a1d38cf2f4f11953db5c408be255dbf60be7
parent519aef2dae56a3b71016ed3a39929f59e3a0955a (diff)
downloadbinutils-92aac466fb204a866ee3fbf65842099ed07a7c08.zip
binutils-92aac466fb204a866ee3fbf65842099ed07a7c08.tar.gz
binutils-92aac466fb204a866ee3fbf65842099ed07a7c08.tar.bz2
Add 'const' to symmisc.c
I noticed a few spots in symmisc.c that could use a 'const'.
-rw-r--r--gdb/symmisc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index caca1e0..3b004ae 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -377,7 +377,9 @@ static void
maintenance_print_symbols (const char *args, int from_tty)
{
struct ui_file *outfile = gdb_stdout;
- char *address_arg = NULL, *source_arg = NULL, *objfile_arg = NULL;
+ const char *address_arg = nullptr;
+ const char *source_arg = nullptr;
+ const char *objfile_arg = nullptr;
int i, outfile_idx;
dont_repeat ();
@@ -655,7 +657,7 @@ static void
maintenance_print_msymbols (const char *args, int from_tty)
{
struct ui_file *outfile = gdb_stdout;
- char *objfile_arg = NULL;
+ const char *objfile_arg = nullptr;
int i, outfile_idx;
dont_repeat ();
@@ -887,7 +889,7 @@ maintenance_check_symtabs (const char *ignore, int from_tty)
static void
maintenance_expand_symtabs (const char *args, int from_tty)
{
- char *regexp = NULL;
+ const char *regexp = nullptr;
/* We use buildargv here so that we handle spaces in the regexp
in a way that allows adding more arguments later. */