Introduce and use make_unique_xstrdup
[deliverable/binutils-gdb.git] / gdb / cp-support.c
index 4afb79a4ea9d032b23e9a49e7f5ee2bae90f10cd..9ba6ee3ede537f2383f73ba9473905f9cfefc278 100644 (file)
@@ -908,7 +908,7 @@ cp_remove_params_if_any (const char *demangled_name, bool completion_mode)
      we're completing / matching everything, avoid returning NULL
      which would make callers interpret the result as an error.  */
   if (demangled_name[0] == '\0' && completion_mode)
-    return gdb::unique_xmalloc_ptr<char> (xstrdup (""));
+    return make_unique_xstrdup ("");
 
   gdb::unique_xmalloc_ptr<char> without_params
     = cp_remove_params_1 (demangled_name, false);
This page took 0.023939 seconds and 4 git commands to generate.