From 7e5f460ec457fe310156e399198a41eb0ce1e98c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 Jul 2021 09:03:29 -0600 Subject: global: Convert simple_strtoul() with hex to hextoul() It is a pain to have to specify the value 16 in each call. Add a new hextoul() function and update the code to use it. Add a proper comment to simple_strtoul() while we are here. Signed-off-by: Simon Glass --- cmd/misc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd/misc.c') diff --git a/cmd/misc.c b/cmd/misc.c index ef540e836f..bcd8d960ee 100644 --- a/cmd/misc.c +++ b/cmd/misc.c @@ -57,9 +57,9 @@ static int do_misc_op(struct cmd_tbl *cmdtp, int flag, return ret; } - offset = simple_strtoul(argv[1], NULL, 16); - buf = (void *)simple_strtoul(argv[2], NULL, 16); - size = simple_strtoul(argv[3], NULL, 16); + offset = hextoul(argv[1], NULL); + buf = (void *)hextoul(argv[2], NULL); + size = hextoul(argv[3], NULL); if (op == MISC_OP_READ) misc_op = misc_read; -- cgit v1.2.3