From e8610d9ca2e763b64284f8cfbdce95654bb3e4d1 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Tue, 26 Jul 2022 12:32:19 +0100 Subject: [PATCH] command: Fixed a clang-tidy warning in cmd_halt_timeout --- src/command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/command.c b/src/command.c index a6a6d00..1fdc218 100644 --- a/src/command.c +++ b/src/command.c @@ -428,8 +428,8 @@ static bool cmd_halt_timeout(target *t, int argc, const char **argv) { (void)t; if (argc > 1) - cortexm_wait_timeout = atol(argv[1]); - gdb_outf("Cortex-M timeout to wait for device haltes: %d\n", cortexm_wait_timeout); + cortexm_wait_timeout = strtoul(argv[1], NULL, 0); + gdb_outf("Cortex-M timeout to wait for device halts: %d\n", cortexm_wait_timeout); return true; }