diff options
author | Andrew Burgess <aburgess@redhat.com> | 2021-11-08 14:58:46 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2021-11-16 17:45:45 +0000 |
commit | 8579fd136a614985bd27f20539c7bb7c5a51287d (patch) | |
tree | fb84850409a44e13e832cbadc9025d40c1d33d9f /gdb/utils.c | |
parent | 2bb7589ddf61e163f2e414e7033fad56ea17e784 (diff) | |
download | gdb-8579fd136a614985bd27f20539c7bb7c5a51287d.zip gdb-8579fd136a614985bd27f20539c7bb7c5a51287d.tar.gz gdb-8579fd136a614985bd27f20539c7bb7c5a51287d.tar.bz2 |
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.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, |