diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-10-24 06:36:06 -0700 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-05 18:03:19 -0800 |
commit | 9b3781e5a4c0145f0be4e7c262975e3b9909d1c4 (patch) | |
tree | 6799b35a7112b9b32612eb67860c9c8965b957dd /src/target | |
parent | af84cd33a2e0b8af31d4c7dbd64cfd0348d65a0e (diff) | |
download | openocd+libswd-9b3781e5a4c0145f0be4e7c262975e3b9909d1c4.tar.gz openocd+libswd-9b3781e5a4c0145f0be4e7c262975e3b9909d1c4.tar.bz2 openocd+libswd-9b3781e5a4c0145f0be4e7c262975e3b9909d1c4.tar.xz openocd+libswd-9b3781e5a4c0145f0be4e7c262975e3b9909d1c4.zip |
Improve cortex_m3 command argument parsing.
Diffstat (limited to 'src/target')
-rw-r--r-- | src/target/cortex_m3.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index 51481a98..a1d1cbc6 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -1830,14 +1830,10 @@ handle_cortex_m3_disassemble_command(struct command_context_s *cmd_ctx, errno = 0; switch (argc) { case 2: - count = strtoul(args[1], NULL, 0); - if (errno) - return ERROR_FAIL; + COMMAND_PARSE_NUMBER(ulong, args[1], count); /* FALL THROUGH */ case 1: - address = strtoul(args[0], NULL, 0); - if (errno) - return ERROR_FAIL; + COMMAND_PARSE_NUMBER(u32, args[0], address); break; default: command_print(cmd_ctx, |