summaryrefslogtreecommitdiff
path: root/src/helper/command.h
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-10 00:10:25 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 10:55:27 -0800
commitcc63d6e72b49dd01706c4d768c1f9bb91db2ae1d (patch)
treebd32aadb9ac6a12e088bcce101f37004828aa124 /src/helper/command.h
parentd22270e0ed291d3b08fd03a25181b279ca5e0911 (diff)
downloadopenocd+libswd-cc63d6e72b49dd01706c4d768c1f9bb91db2ae1d.tar.gz
openocd+libswd-cc63d6e72b49dd01706c4d768c1f9bb91db2ae1d.tar.bz2
openocd+libswd-cc63d6e72b49dd01706c4d768c1f9bb91db2ae1d.tar.xz
openocd+libswd-cc63d6e72b49dd01706c4d768c1f9bb91db2ae1d.zip
command_handler_t: make cmd parameter const
Prevents the command name from being modified in command handlers. Again, this has cascading effects, but the patches are fairly minimal.
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 55773156..18664d23 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, \
- char *cmd, char **args, unsigned argc, ##extra)
+ const char *cmd, char **args, unsigned argc, ##extra)
/**
* Use this to macro to call a command helper (or a nested handler).