aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-03-20 01:37:10 +0000
committerAndrew Cagney <cagney@redhat.com>2001-03-20 01:37:10 +0000
commit3c37485b16d873d9fd8d5d448dce60a2d890e286 (patch)
tree01b974afe0c43b13dc0a0efda5ce8f0cf4b1a6a4 /gdb/valprint.c
parent0e52036f1f47078a9863f6a377ff11e10a81e8c4 (diff)
downloadgdb-3c37485b16d873d9fd8d5d448dce60a2d890e286.zip
gdb-3c37485b16d873d9fd8d5d448dce60a2d890e286.tar.gz
gdb-3c37485b16d873d9fd8d5d448dce60a2d890e286.tar.bz2
malloc() -> xmalloc.
Move malloc() decl to utils.c
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++)
{