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.
__archive__
Zachary T Welch 2009-11-10 00:10:25 -08:00
parent d22270e0ed
commit cc63d6e72b
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ typedef struct command_context_s
*/ */
#define __COMMAND_HANDLER(name, extra...) \ #define __COMMAND_HANDLER(name, extra...) \
int name(struct command_context_s *cmd_ctx, \ 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). * Use this to macro to call a command helper (or a nested handler).