Improve debug_level command argument parsing.
This commit is contained in:
parent
36a3646c22
commit
f6f1dbfafd
|
@ -279,9 +279,7 @@ int handle_debug_level_command(struct command_context_s *cmd_ctx, char *cmd, cha
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
{
|
{
|
||||||
unsigned new_level;
|
unsigned new_level;
|
||||||
int retval = parse_uint(args[0], &new_level);
|
COMMAND_PARSE_NUMBER(uint, args[0], new_level);
|
||||||
if (ERROR_OK != retval)
|
|
||||||
return retval;
|
|
||||||
debug_level = MIN(new_level, LOG_LVL_DEBUG);
|
debug_level = MIN(new_level, LOG_LVL_DEBUG);
|
||||||
}
|
}
|
||||||
else if (argc > 1)
|
else if (argc > 1)
|
||||||
|
|
Loading…
Reference in New Issue