Improve cortex_m3 command argument parsing.
This commit is contained in:
parent
af84cd33a2
commit
9b3781e5a4
|
@ -1830,14 +1830,10 @@ handle_cortex_m3_disassemble_command(struct command_context_s *cmd_ctx,
|
||||||
errno = 0;
|
errno = 0;
|
||||||
switch (argc) {
|
switch (argc) {
|
||||||
case 2:
|
case 2:
|
||||||
count = strtoul(args[1], NULL, 0);
|
COMMAND_PARSE_NUMBER(ulong, args[1], count);
|
||||||
if (errno)
|
|
||||||
return ERROR_FAIL;
|
|
||||||
/* FALL THROUGH */
|
/* FALL THROUGH */
|
||||||
case 1:
|
case 1:
|
||||||
address = strtoul(args[0], NULL, 0);
|
COMMAND_PARSE_NUMBER(u32, args[0], address);
|
||||||
if (errno)
|
|
||||||
return ERROR_FAIL;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
command_print(cmd_ctx,
|
command_print(cmd_ctx,
|
||||||
|
|
Loading…
Reference in New Issue