diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-15 04:57:12 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-17 11:38:06 -0800 |
commit | 7bf1a86e473a12882bf6f71cb4d0d416394b69d4 (patch) | |
tree | 2c9c1d2138df704ac551cdafe105dbb68b8f23b8 /src/server | |
parent | 5b9899d6ea1e0cf763465c64c700f20eddd893f9 (diff) | |
download | openocd+libswd-7bf1a86e473a12882bf6f71cb4d0d416394b69d4.tar.gz openocd+libswd-7bf1a86e473a12882bf6f71cb4d0d416394b69d4.tar.bz2 openocd+libswd-7bf1a86e473a12882bf6f71cb4d0d416394b69d4.tar.xz openocd+libswd-7bf1a86e473a12882bf6f71cb4d0d416394b69d4.zip |
command_handler: change to 'argc' to CMD_ARGC
This patch converts all instances of 'argc' in COMMAND_HANDLER routines
to use CMD_ARGC.
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/gdb_server.c | 12 | ||||
-rw-r--r-- | src/server/server.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 9581ea63..f5eb71da 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2245,7 +2245,7 @@ int gdb_init(void) COMMAND_HANDLER(handle_gdb_sync_command) { - if (argc != 0) + if (CMD_ARGC != 0) { return ERROR_COMMAND_SYNTAX_ERROR; } @@ -2270,7 +2270,7 @@ COMMAND_HANDLER(handle_gdb_port_command) COMMAND_HANDLER(handle_gdb_memory_map_command) { - if (argc == 1) + if (CMD_ARGC == 1) { if (strcmp(args[0], "enable") == 0) { @@ -2291,7 +2291,7 @@ COMMAND_HANDLER(handle_gdb_memory_map_command) COMMAND_HANDLER(handle_gdb_flash_program_command) { - if (argc == 1) + if (CMD_ARGC == 1) { if (strcmp(args[0], "enable") == 0) { @@ -2312,7 +2312,7 @@ COMMAND_HANDLER(handle_gdb_flash_program_command) COMMAND_HANDLER(handle_gdb_report_data_abort_command) { - if (argc == 1) + if (CMD_ARGC == 1) { if (strcmp(args[0], "enable") == 0) { @@ -2334,10 +2334,10 @@ COMMAND_HANDLER(handle_gdb_report_data_abort_command) /* gdb_breakpoint_override */ COMMAND_HANDLER(handle_gdb_breakpoint_override_command) { - if (argc == 0) + if (CMD_ARGC == 0) { - } else if (argc == 1) + } else if (CMD_ARGC == 1) { gdb_breakpoint_override = 1; if (strcmp(args[0], "hard") == 0) diff --git a/src/server/server.c b/src/server/server.c index 92292eb5..17a116d2 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -551,7 +551,7 @@ int server_register_commands(struct command_context *context) SERVER_PORT_COMMAND() { - switch (argc) { + switch (CMD_ARGC) { case 0: command_print(cmd_ctx, "%d", *out); break; |