From 0b1284eb52578e15ec611adc5fee1a9ae68dadea Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 Jul 2021 09:03:30 -0600 Subject: global: Convert simple_strtoul() with decimal to dectoul() It is a pain to have to specify the value 10 in each call. Add a new dectoul() function and update the code to use it. Signed-off-by: Simon Glass --- board/siemens/taurus/taurus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'board/siemens/taurus/taurus.c') diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index cad16f90656..dae064d4654 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -394,10 +394,9 @@ static int do_upgrade_available(struct cmd_tbl *cmdtp, int flag, int argc, unsigned long boot_retry = 0; char boot_buf[10]; - upgrade_available = simple_strtoul(env_get("upgrade_available"), NULL, - 10); + upgrade_available = dectoul(env_get("upgrade_available"), NULL); if (upgrade_available) { - boot_retry = simple_strtoul(env_get("boot_retries"), NULL, 10); + boot_retry = dectoul(env_get("boot_retries"), NULL); boot_retry++; sprintf(boot_buf, "%lx", boot_retry); env_set("boot_retries", boot_buf); -- cgit v1.2.3