diff options
author | Simon Glass <sjg@chromium.org> | 2021-07-24 09:03:29 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-08-02 13:32:14 -0400 |
commit | 7e5f460ec457fe310156e399198a41eb0ce1e98c (patch) | |
tree | 7e89e4d15fcea2d2263c4b4af1be69905537ef42 /common/bootm_os.c | |
parent | 031725f8cdf33e836d19f35d3fe82c5baa5a2976 (diff) | |
download | u-boot-7e5f460ec457fe310156e399198a41eb0ce1e98c.tar.gz u-boot-7e5f460ec457fe310156e399198a41eb0ce1e98c.tar.bz2 u-boot-7e5f460ec457fe310156e399198a41eb0ce1e98c.zip |
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 <sjg@chromium.org>
Diffstat (limited to 'common/bootm_os.c')
-rw-r--r-- | common/bootm_os.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/bootm_os.c b/common/bootm_os.c index 0b6325db66..d635037064 100644 --- a/common/bootm_os.c +++ b/common/bootm_os.c @@ -238,7 +238,7 @@ static int do_bootm_plan9(int flag, int argc, char *const argv[], /* See README.plan9 */ s = env_get("confaddr"); if (s != NULL) { - char *confaddr = (char *)simple_strtoul(s, NULL, 16); + char *confaddr = (char *)hextoul(s, NULL); if (argc > 0) { copy_args(confaddr, argc, argv, '\n'); @@ -360,8 +360,7 @@ int do_bootm_vxworks(int flag, int argc, char *const argv[], /* find f=0xnumber flag */ if ((bootargs[pos] == '=') && (pos >= 1) && (bootargs[pos - 1] == 'f')) { - vxflags = simple_strtoul(&bootargs[pos + 1], - NULL, 16); + vxflags = hextoul(&bootargs[pos + 1], NULL); if (vxflags & VXWORKS_SYSFLG_STD_DTB) std_dtb = true; } |