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.
This commit is contained in:
Tom Tromey
2022-02-03 11:45:59 -07:00
parent fd3c53675c
commit 2b53149244
6 changed files with 8 additions and 27 deletions

View File

@ -550,7 +550,7 @@ objfpy_build_id_matches (const struct bfd_build_id *build_id,
for (i = 0; i < build_id->size; ++i)
{
char c1 = string[i * 2], c2 = string[i * 2 + 1];
int byte = (host_hex_value (c1) << 4) | host_hex_value (c2);
int byte = (fromhex (c1) << 4) | fromhex (c2);
if (byte != build_id->data[i])
return 0;