aboutsummaryrefslogtreecommitdiff
path: root/debug
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2018-11-12 14:07:26 -0800
committerTim Newsome <tim@sifive.com>2018-11-12 14:07:26 -0800
commitcfab417615b101e1834fe56bcfe9b11b91a6eaea (patch)
treef135325fdc9d3d6ee4b3d3642265b8e66a6cc462 /debug
parent8312d916002aae641cb845c0c6591bbab03b2c92 (diff)
downloadriscv-tests-cfab417615b101e1834fe56bcfe9b11b91a6eaea.zip
riscv-tests-cfab417615b101e1834fe56bcfe9b11b91a6eaea.tar.gz
riscv-tests-cfab417615b101e1834fe56bcfe9b11b91a6eaea.tar.bz2
Simpler/more idiomatic way to keep string on stack
Diffstat (limited to 'debug')
-rw-r--r--debug/programs/debug.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/debug/programs/debug.c b/debug/programs/debug.c
index 44b4b51..8a4aa73 100644
--- a/debug/programs/debug.c
+++ b/debug/programs/debug.c
@@ -53,12 +53,9 @@ int main()
volatile int i = 0;
int j = 0;
- static char fox[43];
+ char fox[] = "The quick brown fox jumps of the lazy dog.";
unsigned int checksum = 0;
- /* fox needs to be writable, but the string could be in ROM. */
- strcpy(fox, "The quick brown fox jumps of the lazy dog.");
-
start:
while (i)
j++;