Use ui_file_as_string throughout more
[deliverable/binutils-gdb.git] / gdb / c-lang.c
index d24b0c83e1f78565bdb4c5d1bb7b758b3ac3ae99..ecc1e795a9c6df0cbecdc865e634367d6bf39150 100644 (file)
@@ -356,14 +356,11 @@ c_get_string (struct value *value, gdb_byte **buffer,
 
  error:
   {
-    char *type_str;
-
-    type_str = type_to_string (type);
-    if (type_str)
+    std::string type_str = type_to_string (type);
+    if (!type_str.empty ())
       {
-       make_cleanup (xfree, type_str);
        error (_("Trying to read string with inappropriate type `%s'."),
-              type_str);
+              type_str.c_str ());
       }
     else
       error (_("Trying to read string with inappropriate type."));
This page took 0.023844 seconds and 4 git commands to generate.