diff options
author | Simon Glass <sjg@chromium.org> | 2021-07-24 09:03:30 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-08-02 13:32:14 -0400 |
commit | 0b1284eb52578e15ec611adc5fee1a9ae68dadea (patch) | |
tree | 2d83815e93fc16decbaa5671fd660ade0ec74532 /examples/standalone | |
parent | 7e5f460ec457fe310156e399198a41eb0ce1e98c (diff) | |
download | u-boot-0b1284eb52578e15ec611adc5fee1a9ae68dadea.tar.gz u-boot-0b1284eb52578e15ec611adc5fee1a9ae68dadea.tar.bz2 u-boot-0b1284eb52578e15ec611adc5fee1a9ae68dadea.zip |
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/standalone')
-rw-r--r-- | examples/standalone/atmel_df_pow2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/standalone/atmel_df_pow2.c b/examples/standalone/atmel_df_pow2.c index 9c74f4994b..dcb25da949 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"); |