forked from auracaster/openocd
command_handler_t: make args parameter const
This patch prevents command handlers from modifying the strings passed in the 'args' array.
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user