aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSimon Glass2021-07-24 09:03:30 -0600
committerTom Rini2021-08-02 13:32:14 -0400
commit0b1284eb52578e15ec611adc5fee1a9ae68dadea (patch)
tree2d83815e93fc16decbaa5671fd660ade0ec74532 /examples
parent7e5f460ec457fe310156e399198a41eb0ce1e98c (diff)
global: Convert simple_strtoul() with decimal to dectoul()
It is a pain to have to specify the value 10 in each call. Add a new dectoul() function and update the code to use it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/standalone/atmel_df_pow2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/standalone/atmel_df_pow2.c b/examples/standalone/atmel_df_pow2.c
index 9c74f4994b9..dcb25da9498 100644
--- a/examples/standalone/atmel_df_pow2.c
+++ b/examples/standalone/atmel_df_pow2.c
@@ -141,11 +141,12 @@ int atmel_df_pow2(int argc, char *const argv[])
if (line[0] == '\0')
continue;
- bus = cs = simple_strtoul(line, &p, 10);
+ bus = dectoul(line, &p);
+ cs = bus;
if (*p) {
if (*p == ':') {
++p;
- cs = simple_strtoul(p, &p, 10);
+ cs = dectoul(p, &p);
}
if (*p) {
puts("invalid format, please try again\n");