summaryrefslogtreecommitdiff
path: root/sim/cr16
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-02-20 00:28:17 -0500
committerMike Frysinger <vapier@gentoo.org>2014-03-10 22:57:29 -0400
commit60d847df0b9691b7cb38bfba41b9d6aafd97efc2 (patch)
treea2fa4e54d1c4bc8a82cdc5fbd65f5958875356cf /sim/cr16
parent61d1ce24e894c08a701efc5794012161ef101a60 (diff)
downloadbinutils-gdb-60d847df0b9691b7cb38bfba41b9d6aafd97efc2.tar.gz
sim: constify arg to sim_do_command
It is rare for people to want to modify the cmd arg. In general, they really shouldn't be, but a few still do. For those who misbehave, dupe the string locally so they can bang on it.
Diffstat (limited to 'sim/cr16')
-rw-r--r--sim/cr16/ChangeLog4
-rw-r--r--sim/cr16/interp.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog
index 9903ad4fa6f..dda7e60456a 100644
--- a/sim/cr16/ChangeLog
+++ b/sim/cr16/ChangeLog
@@ -1,3 +1,7 @@
+2014-03-10 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (sim_do_command): Add const to cmd.
+
2014-03-05 Mike Frysinger <vapier@gentoo.org>
* interp.c (sim_load): Add const to prog.
diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c
index 48da9167d93..e04ccc4db0c 100644
--- a/sim/cr16/interp.c
+++ b/sim/cr16/interp.c
@@ -1561,7 +1561,7 @@ sim_complete_command (SIM_DESC sd, const char *text, const char *word)
void
sim_do_command (sd, cmd)
SIM_DESC sd;
- char *cmd;
+ const char *cmd;
{
(*cr16_callback->printf_filtered) (cr16_callback, "sim_do_command: %s\n",cmd);
}