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>
diff --git a/common/image-fit.c b/common/image-fit.c
index d6b2c3c..aff4670 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -53,7 +53,7 @@
sep = strchr(spec, sepc);
if (sep) {
if (sep - spec > 0)
- *addr = simple_strtoul(spec, NULL, 16);
+ *addr = hextoul(spec, NULL);
*name = sep + 1;
return 1;