*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / dfp.c
index 9816d272e89bf8350737b5f9346d5d20bf5a8ea0..bbaf9aa6c55d27c5ad012dd0f40b5a586e19e2b2 100644 (file)
--- a/gdb/dfp.c
+++ b/gdb/dfp.c
@@ -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.  */
This page took 0.024066 seconds and 4 git commands to generate.