diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-01-12 20:00:07 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-01-12 20:00:07 +0000 |
commit | c8dd9792323ff29b8cbf4c39007c5f3ed088fb75 (patch) | |
tree | 08f61379e0b03f438dd07b395c16db4e409e61cd /gdb/language.c | |
parent | 99d91aecfc75a64ef38212ca285d1af5f836c7ec (diff) | |
download | gdb-c8dd9792323ff29b8cbf4c39007c5f3ed088fb75.tar.gz |
Use phex_nz() not printf
Diffstat (limited to 'gdb/language.c')
-rw-r--r-- | gdb/language.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/gdb/language.c b/gdb/language.c index 9c27f0de5eb..f8525b6843d 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -662,21 +662,10 @@ longest_local_hex_string_custom (LONGEST num, char *width) sprintf (res2, format, num); return res2; #else /* !defined (PRINTF_HAS_LONG_LONG) */ - /* Use strcat_address_numeric to print the number into a string, then + /* Use phex_nz to print the number into a string, then build the result string from local_hex_format_prefix, padding and the hex representation as indicated by "width". */ - - temp_nbr_buf[0] = 0; - /* With use_local == 0, we don't get the leading "0x" prefix. */ - /* MERGEBUG ?? As a quick fix I am replacing this call to - strcat_address_numeric with sprintf - strcat_address_numeric(num, 0, temp_nbr_buf, RESULT_BUF_LEN); - */ - - { - long long ll = num; - sprintf (temp_nbr_buf, "%llx", ll); - } + strcpy (temp_nbr_buf, phex_nz (num, sizeof (num))); /* parse width */ parse_ptr = width; pad_on_left = 1; |