This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 2/3] Constify remote_console_output
- From: Tom Tromey <tom at tromey dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tom at tromey dot com>
- Date: Sun, 6 Jan 2019 15:46:35 -0700
- Subject: [PATCH 2/3] Constify remote_console_output
- References: <20190106224636.5271-1-tom@tromey.com>
This constifies the parameter to remote_console_output.
2019-01-06 Tom Tromey <tom@tromey.com>
* remote.c (remote_console_output): Make parameter const.
---
gdb/ChangeLog | 4 ++++
gdb/remote.c | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/gdb/remote.c b/gdb/remote.c
index c40f926376..6b5870a70a 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1024,7 +1024,7 @@ static void remote_async_inferior_event_handler (gdb_client_data);
static bool remote_read_description_p (struct target_ops *target);
-static void remote_console_output (char *msg);
+static void remote_console_output (const char *msg);
static void remote_btrace_reset (remote_state *rs);
@@ -6799,9 +6799,9 @@ remote_target::terminal_ours ()
}
static void
-remote_console_output (char *msg)
+remote_console_output (const char *msg)
{
- char *p;
+ const char *p;
for (p = msg; p[0] && p[1]; p += 2)
{
--
2.17.2