diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-10-22 22:34:19 -0700 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-05 18:03:18 -0800 |
commit | f6f1dbfafdfac93d8f9a9540c71f011fac7611e0 (patch) | |
tree | 6d6dde5a7448f03ecf24fc4901a310e46081eaa1 /src | |
parent | 36a3646c2205474345482188c8c05e50d1f67e44 (diff) | |
download | openocd_libswd-f6f1dbfafdfac93d8f9a9540c71f011fac7611e0.tar.gz openocd_libswd-f6f1dbfafdfac93d8f9a9540c71f011fac7611e0.tar.bz2 openocd_libswd-f6f1dbfafdfac93d8f9a9540c71f011fac7611e0.tar.xz openocd_libswd-f6f1dbfafdfac93d8f9a9540c71f011fac7611e0.zip |
Improve debug_level command argument parsing.
Diffstat (limited to 'src')
-rw-r--r-- | src/helper/log.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/helper/log.c b/src/helper/log.c index f68c9a3e..a8b519af 100644 --- a/src/helper/log.c +++ b/src/helper/log.c @@ -279,9 +279,7 @@ int handle_debug_level_command(struct command_context_s *cmd_ctx, char *cmd, cha if (argc == 1) { unsigned new_level; - int retval = parse_uint(args[0], &new_level); - if (ERROR_OK != retval) - return retval; + COMMAND_PARSE_NUMBER(uint, args[0], new_level); debug_level = MIN(new_level, LOG_LVL_DEBUG); } else if (argc > 1) |