summaryrefslogtreecommitdiff
path: root/src/helper/command.h
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-10 04:37:17 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 10:55:27 -0800
commitdeede35c270b078ae63713cfc12aa2bbc9eb78a7 (patch)
treed7cda65e0a71e1fa50d3a493ab18077fa0ca2d69 /src/helper/command.h
parentcc63d6e72b49dd01706c4d768c1f9bb91db2ae1d (diff)
downloadopenocd+libswd-deede35c270b078ae63713cfc12aa2bbc9eb78a7.tar.gz
openocd+libswd-deede35c270b078ae63713cfc12aa2bbc9eb78a7.tar.bz2
openocd+libswd-deede35c270b078ae63713cfc12aa2bbc9eb78a7.tar.xz
openocd+libswd-deede35c270b078ae63713cfc12aa2bbc9eb78a7.zip
command_handler_t: make args parameter const
This patch prevents command handlers from modifying the strings passed in the 'args' array.
Diffstat (limited to 'src/helper/command.h')
-rw-r--r--src/helper/command.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helper/command.h b/src/helper/command.h
index 18664d23..fbcc0aa0 100644
--- a/src/helper/command.h
+++ b/src/helper/command.h
@@ -88,7 +88,7 @@ typedef struct command_context_s
*/
#define __COMMAND_HANDLER(name, extra...) \
int name(struct command_context_s *cmd_ctx, \
- const char *cmd, char **args, unsigned argc, ##extra)
+ const char *cmd, const char *args[], unsigned argc, ##extra)
/**
* Use this to macro to call a command helper (or a nested handler).