diff options
author | Tom Tromey <tromey@adacore.com> | 2022-02-03 11:45:59 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-02-04 07:37:22 -0700 |
commit | 2b531492447d10de27e6210117509097f6cbc9e0 (patch) | |
tree | 5e08243a39a075762c852e656563a6c3faf62b38 /gdb/c-lang.c | |
parent | fd3c53675c01472caaa4eb976781b9d6d2d3c53d (diff) | |
download | gdb-2b531492447d10de27e6210117509097f6cbc9e0.zip gdb-2b531492447d10de27e6210117509097f6cbc9e0.tar.gz gdb-2b531492447d10de27e6210117509097f6cbc9e0.tar.bz2 |
Remove host_hex_value
I noticed that host_hex_value is redundant, because gdbsupport already
has fromhex. This patch removes the former in favor of the latter.
Regression tested on x86-64 Fedora 34.
Diffstat (limited to 'gdb/c-lang.c')
-rw-r--r-- | gdb/c-lang.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/c-lang.c b/gdb/c-lang.c index ed7554f..1f7cac7 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -410,7 +410,7 @@ convert_ucn (const char *p, const char *limit, const char *dest_charset, int i; for (i = 0; i < length && p < limit && ISXDIGIT (*p); ++i, ++p) - result = (result << 4) + host_hex_value (*p); + result = (result << 4) + fromhex (*p); for (i = 3; i >= 0; --i) { @@ -454,7 +454,7 @@ convert_octal (struct type *type, const char *p, i < 3 && p < limit && ISDIGIT (*p) && *p != '8' && *p != '9'; ++i) { - value = 8 * value + host_hex_value (*p); + value = 8 * value + fromhex (*p); ++p; } @@ -476,7 +476,7 @@ convert_hex (struct type *type, const char *p, while (p < limit && ISXDIGIT (*p)) { - value = 16 * value + host_hex_value (*p); + value = 16 * value + fromhex (*p); ++p; } |