From 8579fd136a614985bd27f20539c7bb7c5a51287d Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Mon, 8 Nov 2021 14:58:46 +0000 Subject: 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. --- gdb/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/utils.c') diff --git a/gdb/utils.c b/gdb/utils.c index 92a847a..e27a881 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -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, -- cgit v1.1