summaryrefslogtreecommitdiff
path: root/src/helper/command.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-15 08:15:59 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-17 11:38:07 -0800
commit23402315ce01071f30d7ec0c5ca7563ce41f1cc6 (patch)
tree2b1cad0044d857844f7d6b35b5ffadd390594c9b /src/helper/command.c
parent7bf1a86e473a12882bf6f71cb4d0d416394b69d4 (diff)
downloadopenocd+libswd-23402315ce01071f30d7ec0c5ca7563ce41f1cc6.tar.gz
openocd+libswd-23402315ce01071f30d7ec0c5ca7563ce41f1cc6.tar.bz2
openocd+libswd-23402315ce01071f30d7ec0c5ca7563ce41f1cc6.tar.xz
openocd+libswd-23402315ce01071f30d7ec0c5ca7563ce41f1cc6.zip
command_handler: change 'args' to CMD_ARGV
This patch converts all instances of 'args' in COMMAND_HANDLER routines to use CMD_ARGV macro.
Diffstat (limited to 'src/helper/command.c')
-rw-r--r--src/helper/command.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index 3abfdd67..fdb59f01 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -142,7 +142,7 @@ static int script_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
log_add_callback(tcl_output, tclOutput);
- // turn words[0] into args[-1] with this cast
+ // turn words[0] into CMD_ARGV[-1] with this cast
retval = run_command(context, c, (const char **)words + 1, nwords);
log_remove_callback(tcl_output, tclOutput);
@@ -725,7 +725,7 @@ COMMAND_HANDLER(handle_sleep_command)
bool busy = false;
if (CMD_ARGC == 2)
{
- if (strcmp(args[1], "busy") == 0)
+ if (strcmp(CMD_ARGV[1], "busy") == 0)
busy = true;
else
return ERROR_COMMAND_SYNTAX_ERROR;
@@ -734,7 +734,7 @@ COMMAND_HANDLER(handle_sleep_command)
return ERROR_COMMAND_SYNTAX_ERROR;
unsigned long duration = 0;
- int retval = parse_ulong(args[0], &duration);
+ int retval = parse_ulong(CMD_ARGV[0], &duration);
if (ERROR_OK != retval)
return retval;
@@ -758,7 +758,7 @@ COMMAND_HANDLER(handle_fast_command)
if (CMD_ARGC != 1)
return ERROR_COMMAND_SYNTAX_ERROR;
- fast_and_dangerous = strcmp("enable", args[0]) == 0;
+ fast_and_dangerous = strcmp("enable", CMD_ARGV[0]) == 0;
return ERROR_OK;
}