From ca594adb5a71f2bf60c1380172b8e61b075d9479 Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Tue, 10 Nov 2009 04:27:15 -0800 Subject: 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. --- src/flash/lpc2900.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/flash/lpc2900.c') 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) { -- cgit v1.2.3