summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-08 10:55:44 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-08 10:55:44 +0000
commit791701165c1ae59cdbdcfeef5c52120fc77969c3 (patch)
tree746160ec82b71b1f1cc8d1744c8cdfb5897be5b7 /src
parent5c9221ce616b179d924c044854a7bf680f25161a (diff)
downloadopenocd_libswd-791701165c1ae59cdbdcfeef5c52120fc77969c3.tar.gz
openocd_libswd-791701165c1ae59cdbdcfeef5c52120fc77969c3.tar.bz2
openocd_libswd-791701165c1ae59cdbdcfeef5c52120fc77969c3.tar.xz
openocd_libswd-791701165c1ae59cdbdcfeef5c52120fc77969c3.zip
Cleanup handle_runtest_command:
- Make command argument require exactly one argument; do not allow extras. - Remove superfluous whitespace at end of function. - Wrap function arguments to fit in 80 columns. git-svn-id: svn://svn.berlios.de/openocd/trunk@2115 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/jtag/jtag.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 3011adfe..f15e895a 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -2234,18 +2234,16 @@ static int handle_jtag_reset_command(struct command_context_s *cmd_ctx,
return ERROR_OK;
}
-static int handle_runtest_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_runtest_command(struct command_context_s *cmd_ctx,
+ char *cmd, char **args, int argc)
{
- if (argc < 1)
- {
+ if (argc != 1)
return ERROR_COMMAND_SYNTAX_ERROR;
- }
jtag_add_runtest(strtol(args[0], NULL, 0), jtag_get_end_state());
jtag_execute_queue();
return ERROR_OK;
-
}
/*