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/tui/tui-layout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/tui') diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 2dfc519..89f84a2 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -850,10 +850,10 @@ add_layout_command (const char *name, tui_layout_split *layout) layout->specification (&spec, 0); gdb::unique_xmalloc_ptr doc - (xstrprintf (_("Apply the \"%s\" layout.\n\ + = xstrprintf (_("Apply the \"%s\" layout.\n\ This layout was created using:\n\ tui new-layout %s %s"), - name, name, spec.c_str ())); + name, name, spec.c_str ()); cmd = add_cmd (name, class_tui, nullptr, doc.get (), &layout_list); cmd->set_context (layout); -- cgit v1.1