summaryrefslogtreecommitdiff
path: root/gdb/tui/tui-source.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-09-10 12:56:09 -0600
committerTom Tromey <tom@tromey.com>2019-09-20 13:49:12 -0600
commitf074b67ec812612637342a1647da9158a1e77de0 (patch)
treef0cdc8bf43671b2cc89c0bd9e02167fb826c18e9 /gdb/tui/tui-source.c
parent63c4bf1922d5553edb213606270b0e2782bbe4c8 (diff)
downloadbinutils-gdb-f074b67ec812612637342a1647da9158a1e77de0.tar.gz
Use make_unique_xstrdup in TUI
This changes a couple of spots in the TUI to use make_unique_xstrdup. This simplifies the code slightly. gdb/ChangeLog 2019-09-20 Tom Tromey <tom@tromey.com> * tui/tui-source.c (tui_source_window::set_contents): Use make_unique_xstrdup. * tui/tui-disasm.c (tui_disasm_window::set_contents): Use make_unique_xstrdup.
Diffstat (limited to 'gdb/tui/tui-source.c')
-rw-r--r--gdb/tui/tui-source.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index fa6ed7893fe..bb1013bb869 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -183,7 +183,7 @@ tui_source_window::set_contents (struct gdbarch *arch,
symtab_to_fullname (s)) == 0
&& cur_line_no == locator->line_no);
- content[cur_line].line.reset (xstrdup (text.c_str ()));
+ content[cur_line].line = make_unique_xstrdup (text.c_str ());
cur_line++;
cur_line_no++;