From: Zachary T Welch Date: Sat, 24 Oct 2009 13:36:06 +0000 (-0700) Subject: Improve cortex_m3 command argument parsing. X-Git-Tag: v0.4.0-rc1~932 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9b3781e5a4c0145f0be4e7c262975e3b9909d1c4;p=openocd Improve cortex_m3 command argument parsing. --- 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,