diff options
author | Tim Newsome <tim@sifive.com> | 2018-11-12 14:07:26 -0800 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2018-11-12 14:07:26 -0800 |
commit | cfab417615b101e1834fe56bcfe9b11b91a6eaea (patch) | |
tree | f135325fdc9d3d6ee4b3d3642265b8e66a6cc462 /debug | |
parent | 8312d916002aae641cb845c0c6591bbab03b2c92 (diff) | |
download | riscv-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.c | 5 |
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++; |