aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index ccd4542..49c6cb8 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -838,9 +838,7 @@ print_decimal_chars (struct ui_file *stream, unsigned char *valaddr,
* as the base 16 number, which is 2 digits per byte.
*/
decimal_len = len * 2 * 2;
- digits = (unsigned char *) malloc (decimal_len);
- if (digits == NULL)
- error ("Can't allocate memory for conversion to decimal.");
+ digits = xmalloc (decimal_len);
for (i = 0; i < decimal_len; i++)
{