diff options
author | Tom Tromey <tromey@redhat.com> | 2008-09-13 23:37:05 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2008-09-13 23:37:05 +0000 |
commit | 6c761d9c9c9271145dccec5103e8fdc4fde64e9d (patch) | |
tree | 8d989356dc93a47bcbd229b86fcf4ffd58cadf01 /gdb/dfp.c | |
parent | 339c13b662e90ae3ba32ac076a8fd6dd4548d608 (diff) | |
download | gdb-6c761d9c9c9271145dccec5103e8fdc4fde64e9d.zip gdb-6c761d9c9c9271145dccec5103e8fdc4fde64e9d.tar.gz gdb-6c761d9c9c9271145dccec5103e8fdc4fde64e9d.tar.bz2 |
* varobj.c (varobj_set_display_format): Use xfree.
* tracepoint.c (stringify_collection_list): Use xfree.
* remote-fileio.c (remote_fileio_reset): Use xfree.
* mipsread.c (read_alphacoff_dynamic_symtab): Use xfree.
* dfp.c (decimal_from_floating): Use xfree, xstrprintf. Don't use
asprintf.
* cp-support.c (mangled_name_to_comp): Use xfree.
Diffstat (limited to 'gdb/dfp.c')
-rw-r--r-- | gdb/dfp.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -235,16 +235,12 @@ void decimal_from_floating (struct value *from, gdb_byte *to, int len) { char *buffer; - int ret; - ret = asprintf (&buffer, "%.30" DOUBLEST_PRINT_FORMAT, - value_as_double (from)); - if (ret < 0) - error (_("Error in memory allocation for conversion to decimal float.")); + buffer = xstrprintf ("%.30" DOUBLEST_PRINT_FORMAT, value_as_double (from)); decimal_from_string (to, len, buffer); - free (buffer); + xfree (buffer); } /* Converts a decimal float of LEN bytes to a double value. */ |