summaryrefslogtreecommitdiff
path: root/src/flash/lpc2900.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-10 04:27:15 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-11 11:53:22 -0800
commitca594adb5a71f2bf60c1380172b8e61b075d9479 (patch)
treec4702f927f5991c0075479259e0562db1c941cc4 /src/flash/lpc2900.c
parent9741e126fd854815460296ad47d027129c7f17bf (diff)
downloadopenocd+libswd-ca594adb5a71f2bf60c1380172b8e61b075d9479.tar.gz
openocd+libswd-ca594adb5a71f2bf60c1380172b8e61b075d9479.tar.bz2
openocd+libswd-ca594adb5a71f2bf60c1380172b8e61b075d9479.tar.xz
openocd+libswd-ca594adb5a71f2bf60c1380172b8e61b075d9479.zip
add const keyword to some APIs
Add 'const' keyword to 'char *' parameters to allow command handlers to pass constant string arguments. These changes allow the 'args' command handler to be changed to 'const' in a subsequent patch.
Diffstat (limited to 'src/flash/lpc2900.c')
-rw-r--r--src/flash/lpc2900.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/flash/lpc2900.c b/src/flash/lpc2900.c
index f2daab4c..251f682f 100644
--- a/src/flash/lpc2900.c
+++ b/src/flash/lpc2900.c
@@ -635,7 +635,7 @@ static int lpc2900_handle_read_custom_command( struct command_context_s *cmd_ctx
/* Try and open the file */
fileio_t fileio;
- char *filename = args[1];
+ const char *filename = args[1];
int ret = fileio_open( &fileio, filename, FILEIO_WRITE, FILEIO_BINARY );
if( ret != ERROR_OK )
{
@@ -747,8 +747,8 @@ static int lpc2900_handle_write_custom_command( struct command_context_s *cmd_ct
image.base_address = 0;
image.start_address_set = 0;
- char *filename = args[1];
- char *type = (argc >= 3) ? args[2] : NULL;
+ const char *filename = args[1];
+ const char *type = (argc >= 3) ? args[2] : NULL;
retval = image_open(&image, filename, type);
if (retval != ERROR_OK)
{