aboutsummaryrefslogtreecommitdiff
path: root/src/helper/command.c
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2024-07-14 12:09:15 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2024-08-25 12:36:00 +0000
commit8a3efbf21fda2ac673c401f8b9ec82d300c2af29 (patch)
tree1a20822ff0da43706b9f5895b22512688cf9ab87 /src/helper/command.c
parentea859e1cd042578ea17994b56ac15be216eefe4a (diff)
downloadriscv-openocd-8a3efbf21fda2ac673c401f8b9ec82d300c2af29.zip
riscv-openocd-8a3efbf21fda2ac673c401f8b9ec82d300c2af29.tar.gz
riscv-openocd-8a3efbf21fda2ac673c401f8b9ec82d300c2af29.tar.bz2
binarybuffer: simplify the prototype of str_to_buf()
With 'radix' always zero and '_detected_radix' always NULL, drop the two parameters and simplify str_to_buf(). While there: - drop some redundant assert(), - drop the re-check for the base prefix, - simplify str_strip_number_prefix_if_present() and rename it, as the prefix MUST be present, - fix a minor typo, - update the doxygen description of str_to_buf(). Change-Id: I1abdc8ec0587b23881953d3094101c04d5bb1c58 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8394 Tested-by: jenkins Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
Diffstat (limited to 'src/helper/command.c')
-rw-r--r--src/helper/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index b5dd927..9078693 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -1365,7 +1365,7 @@ COMMAND_HELPER(command_parse_str_to_buf, const char *str, void *buf, unsigned in
assert(str);
assert(buf);
- int ret = str_to_buf(str, buf, buf_len, 0, NULL);
+ int ret = str_to_buf(str, buf, buf_len);
if (ret == ERROR_OK)
return ret;