]> git.sur5r.net Git - openocd/commitdiff
Improve armv4_5 command argument parsing.
authorZachary T Welch <zw@superlucidity.net>
Sat, 24 Oct 2009 13:36:05 +0000 (06:36 -0700)
committerZachary T Welch <zw@superlucidity.net>
Fri, 6 Nov 2009 02:03:19 +0000 (18:03 -0800)
src/target/armv4_5.c

index eedbc702d6750792f7cb252e900252ee1524238a..9d942ae9f116d644f14987da456233c3e33216de 100644 (file)
@@ -415,10 +415,10 @@ handle_armv4_5_disassemble_command(struct command_context_s *cmd_ctx,
                thumb = 1;
                /* FALL THROUGH */
        case 2:
-               count = strtoul(args[1], NULL, 0);
+               COMMAND_PARSE_NUMBER(int, args[1], count);
                /* FALL THROUGH */
        case 1:
-               address = strtoul(args[0], NULL, 0);
+               COMMAND_PARSE_NUMBER(u32, args[0], address);
                if (address & 0x01) {
                        if (!thumb) {
                                command_print(cmd_ctx, "Disassemble as Thumb");