gdb/gdbsupport: make xstrprintf and xstrvprintf return a unique_ptr
The motivation is to reduce the number of places where unmanaged pointers are returned from allocation type routines. All of the callers are updated. There should be no user visible changes after this commit.
This commit is contained in:
parent
2bb7589ddf
commit
8579fd136a
34 changed files with 119 additions and 151 deletions
|
@ -534,10 +534,10 @@ add_internal_problem_command (struct internal_problem *problem)
|
|||
set_doc and show_doc in this function. */
|
||||
const char *set_doc
|
||||
= xstrprintf (_("Configure what GDB does when %s is detected."),
|
||||
problem->name);
|
||||
problem->name).release ();
|
||||
const char *show_doc
|
||||
= xstrprintf (_("Show what GDB does when %s is detected."),
|
||||
problem->name);
|
||||
problem->name).release ();
|
||||
|
||||
add_setshow_prefix_cmd (problem->name, class_maintenance,
|
||||
set_doc, show_doc, set_cmd_list, show_cmd_list,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue