diff options
author | Tom Tromey <tom@tromey.com> | 2017-10-11 17:04:29 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-11-07 13:59:09 -0700 |
commit | 5614fb77203f5ea01edfb2d739e9d4f3d570dc09 (patch) | |
tree | c1be8808b82dfd1c66d589ef444b50c9776c40db /gdb/source.c | |
parent | 6be9a197d96c3c346271b46ec6270bd719eb9932 (diff) | |
download | binutils-gdb-5614fb77203f5ea01edfb2d739e9d4f3d570dc09.tar.gz |
Constify add_path and friends
This constifies add_path, mod_path, and directory_switch.
gdb/ChangeLog
2017-11-07 Tom Tromey <tom@tromey.com>
* source.c (directory_switch, mod_path, add_path): Constify.
* defs.h (add_path, mod_path, directory_switch): Constify.
* mi/mi-cmd-env.c (env_mod_path): Constify.
Diffstat (limited to 'gdb/source.c')
-rw-r--r-- | gdb/source.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/source.c b/gdb/source.c index aa672fde45e..4ae2ba251b7 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -444,7 +444,7 @@ directory_command (char *dirname, int from_tty) This will not be quoted so we must not treat spaces as separators. */ void -directory_switch (char *dirname, int from_tty) +directory_switch (const char *dirname, int from_tty) { add_path (dirname, &source_path, 0); } @@ -452,7 +452,7 @@ directory_switch (char *dirname, int from_tty) /* Add zero or more directories to the front of an arbitrary path. */ void -mod_path (char *dirname, char **which_path) +mod_path (const char *dirname, char **which_path) { add_path (dirname, which_path, 1); } @@ -464,7 +464,7 @@ mod_path (char *dirname, char **which_path) as space or tab. */ void -add_path (char *dirname, char **which_path, int parse_separators) +add_path (const char *dirname, char **which_path, int parse_separators) { char *old = *which_path; int prefix = 0; |