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:
Zachary T Welch
2009-11-10 04:37:17 -08:00
parent cc63d6e72b
commit deede35c27
2 changed files with 7 additions and 5 deletions

View File

@@ -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).