Make ada-lang.c::add_angle_brackets return an std::string
[deliverable/binutils-gdb.git] / gdb / ada-lang.c
index db5334dd1e00cbfc831932ae4febe3a1adb19f1c..d9d3087642bcd46a3881789191546fa873829aca 100644 (file)
@@ -541,17 +541,12 @@ ada_unqualified_name (const char *decoded_name)
   return result;
 }
 
-/* Return a string starting with '<', followed by STR, and '>'.
-   The result is good until the next call.  */
+/* Return a string starting with '<', followed by STR, and '>'.  */
 
-static char *
+static std::string
 add_angle_brackets (const char *str)
 {
-  static char *result = NULL;
-
-  xfree (result);
-  result = xstrprintf ("<%s>", str);
-  return result;
+  return string_printf ("<%s>", str);
 }
 
 static const char *
This page took 0.024844 seconds and 4 git commands to generate.