From: Zachary T Welch Date: Tue, 10 Nov 2009 08:10:25 +0000 (-0800) Subject: command_handler_t: make cmd parameter const X-Git-Tag: v0.4.0-rc1~799 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=cc63d6e72b49dd01706c4d768c1f9bb91db2ae1d 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. --- diff --git a/src/helper/command.h b/src/helper/command.h index 5577315636..18664d23a2 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).