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:
@@ -280,7 +280,7 @@ static int do_afs(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
} else if (argc == 4 && !strcmp(argv[1], "load")) {
|
||||
ulong load_addr;
|
||||
|
||||
load_addr = simple_strtoul(argv[3], NULL, 16);
|
||||
load_addr = hextoul(argv[3], NULL);
|
||||
ret = load_image(argv[2], load_addr);
|
||||
} else {
|
||||
return CMD_RET_USAGE;
|
||||
|
Reference in New Issue
Block a user