From 0b1284eb52578e15ec611adc5fee1a9ae68dadea Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 Jul 2021 09:03:30 -0600 Subject: 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 --- cmd/bind.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd/bind.c') diff --git a/cmd/bind.c b/cmd/bind.c index af2f22cc4c3..07c629eff7c 100644 --- a/cmd/bind.c +++ b/cmd/bind.c @@ -218,13 +218,13 @@ static int do_bind_unbind(struct cmd_tbl *cmdtp, int flag, int argc, return CMD_RET_USAGE; ret = unbind_by_node_path(argv[1]); } else if (!by_node && bind) { - int index = (argc > 2) ? simple_strtoul(argv[2], NULL, 10) : 0; + int index = (argc > 2) ? dectoul(argv[2], NULL) : 0; if (argc != 4) return CMD_RET_USAGE; ret = bind_by_class_index(argv[1], index, argv[3]); } else if (!by_node && !bind) { - int index = (argc > 2) ? simple_strtoul(argv[2], NULL, 10) : 0; + int index = (argc > 2) ? dectoul(argv[2], NULL) : 0; if (argc == 3) ret = unbind_by_class_index(argv[1], index); -- cgit v1.2.3