mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 00:32:04 +02:00
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>
This commit is contained in:
@@ -65,7 +65,7 @@ static int splash_video_logo_load(void)
|
||||
if (!splashimage)
|
||||
return -ENOENT;
|
||||
|
||||
bmp_load_addr = simple_strtoul(splashimage, 0, 16);
|
||||
bmp_load_addr = hextoul(splashimage, 0);
|
||||
if (!bmp_load_addr) {
|
||||
printf("Error: bad 'splashimage' address\n");
|
||||
return -EFAULT;
|
||||
@@ -162,7 +162,7 @@ int splash_display(void)
|
||||
if (!s)
|
||||
return -EINVAL;
|
||||
|
||||
addr = simple_strtoul(s, NULL, 16);
|
||||
addr = hextoul(s, NULL);
|
||||
ret = splash_screen_prepare();
|
||||
if (ret)
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user