From cfab417615b101e1834fe56bcfe9b11b91a6eaea Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Mon, 12 Nov 2018 14:07:26 -0800 Subject: Simpler/more idiomatic way to keep string on stack --- debug/programs/debug.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'debug') 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++; -- cgit v1.1