From: Zachary T Welch Date: Fri, 23 Oct 2009 05:34:19 +0000 (-0700) Subject: Improve debug_level command argument parsing. X-Git-Tag: v0.4.0-rc1~949 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f6f1dbfafdfac93d8f9a9540c71f011fac7611e0;p=openocd Improve debug_level command argument parsing. --- 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)