aboutsummaryrefslogtreecommitdiff
path: root/src/target/breakpoints.c
diff options
context:
space:
mode:
authorSpencer Oliver <spen@spen-soft.co.uk>2014-09-11 22:14:31 +0100
committerSpencer Oliver <spen@spen-soft.co.uk>2014-10-06 11:57:40 +0000
commit3160c66408af858c3064e54fb14f074e54ac6701 (patch)
tree26c57bb046e4c6157a524a31f7a41b4559c00fcc /src/target/breakpoints.c
parentb675edcc95935cbdf77002db1e261536026f4cbe (diff)
downloadriscv-openocd-3160c66408af858c3064e54fb14f074e54ac6701.zip
riscv-openocd-3160c66408af858c3064e54fb14f074e54ac6701.tar.gz
riscv-openocd-3160c66408af858c3064e54fb14f074e54ac6701.tar.bz2
target: constify structures
Change-Id: I875cfab8dec4ade72ed9c9cd7d52baaca182a1ef Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2295 Tested-by: jenkins
Diffstat (limited to 'src/target/breakpoints.c')
-rw-r--r--src/target/breakpoints.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/target/breakpoints.c b/src/target/breakpoints.c
index 5143afb..b854f1f 100644
--- a/src/target/breakpoints.c
+++ b/src/target/breakpoints.c
@@ -29,12 +29,12 @@
#include <helper/log.h>
#include "breakpoints.h"
-static char *breakpoint_type_strings[] = {
+static const char * const breakpoint_type_strings[] = {
"hardware",
"software"
};
-static char *watchpoint_rw_strings[] = {
+static const char * const watchpoint_rw_strings[] = {
"read",
"write",
"access"
@@ -50,7 +50,7 @@ int breakpoint_add_internal(struct target *target,
{
struct breakpoint *breakpoint = target->breakpoints;
struct breakpoint **breakpoint_p = &target->breakpoints;
- char *reason;
+ const char *reason;
int retval;
int n;
@@ -396,7 +396,7 @@ int watchpoint_add(struct target *target, uint32_t address, uint32_t length,
struct watchpoint *watchpoint = target->watchpoints;
struct watchpoint **watchpoint_p = &target->watchpoints;
int retval;
- char *reason;
+ const char *reason;
while (watchpoint) {
if (watchpoint->address == address) {