From 60d847df0b9691b7cb38bfba41b9d6aafd97efc2 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 20 Feb 2014 00:28:17 -0500 Subject: 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. --- sim/ppc/ChangeLog | 4 ++++ sim/ppc/sim_calls.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'sim/ppc') diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index 3f279fe..3ec45a5 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,7 @@ +2014-03-10 Mike Frysinger + + * sim_calls.c (sim_do_command): Add const to cmd. + 2014-03-05 Mike Frysinger * sim_calls.c (sim_load): Add const to prog. diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c index 27ee1fe..4e61335 100644 --- a/sim/ppc/sim_calls.c +++ b/sim/ppc/sim_calls.c @@ -247,7 +247,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal) } void -sim_do_command (SIM_DESC sd, char *cmd) +sim_do_command (SIM_DESC sd, const char *cmd) { TRACE(trace_gdb, ("sim_do_commands(cmd=%s) called\n", cmd ? cmd : "(null)")); -- cgit v1.1