diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-06-25 17:06:18 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-06-25 17:06:18 -0400 |
commit | 58373b80f3d06740fccefe735fbb390791092027 (patch) | |
tree | 3666ab46bf31d35a6b110a7c07555030aaa17876 /gdb | |
parent | 277474eea03e0f77a9d37c69dfab3f0c41812348 (diff) | |
download | gdb-58373b80f3d06740fccefe735fbb390791092027.zip gdb-58373b80f3d06740fccefe735fbb390791092027.tar.gz gdb-58373b80f3d06740fccefe735fbb390791092027.tar.bz2 |
gdb: use make_unique_xstrdup in set_inferior_io_terminal
gdb/ChangeLog:
* infcmd.c (set_inferior_io_terminal): Use make_unique_xstrdup.
Change-Id: I38b6e753f58947531fe4a293d574bc27ec128f47
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/infcmd.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d9b6a49..ddb5c47 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2020-06-25 Simon Marchi <simon.marchi@efficios.com> + * infcmd.c (set_inferior_io_terminal): Use make_unique_xstrdup. + +2020-06-25 Simon Marchi <simon.marchi@efficios.com> + * inferior.h (struct inferior) <terminal>: Change type to gdb::unique_xmalloc_ptr<char>. * inferior.c (inferior::~inferior): Don't free inf->terminal. diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 48d6a91..17f7b9a 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -109,7 +109,7 @@ void set_inferior_io_terminal (const char *terminal_name) { if (terminal_name != NULL && *terminal_name != '\0') - current_inferior ()->terminal.reset (xstrdup (terminal_name)); + current_inferior ()->terminal = make_unique_xstrdup (terminal_name); else current_inferior ()->terminal = NULL; } |