fix segfault at startup
authorZachary T Welch <zw@superlucidity.net>
Wed, 18 Nov 2009 19:56:24 +0000 (11:56 -0800)
committerZachary T Welch <zw@superlucidity.net>
Wed, 18 Nov 2009 19:56:24 +0000 (11:56 -0800)
The previous changes to move the startup TCL code resulted in segfaults
during startup.  This seemingly innocuous patch fixes the problem.
I would explain why changing from 'foo[]' to '*foo' caused this issue,
but the difference seems superficial.  For now, this hot fix will do,
but this issue might bear further scrutiny.

src/openocd.h

index 70e3ee0126f30e524bc1c935b3b4ac3af0ee0a08..a91d46f2f2568358f0ec402fc2366117fc04abcc 100644 (file)
@@ -37,6 +37,6 @@ void openocd_sleep_prelude(void);
 void openocd_sleep_postlude(void);
 
 /// provides a hard-coded command environment setup
-extern const char *openocd_startup_tcl;
+extern const char openocd_startup_tcl[];
 
 #endif