Yet another cleanup eliminated.
gdb/ChangeLog:
2016-11-08 Pedro Alves <palves@redhat.com>
* printcmd.c (eval_command): Use ui_file_as_string and
std::string.
2016-11-08 Pedro Alves <palves@redhat.com>
+ * printcmd.c (eval_command): Use ui_file_as_string and
+ std::string.
+
+2016-11-08 Pedro Alves <palves@redhat.com>
+
* top.c (quit_confirm): Use ui_file_as_string and std::string.
2016-11-08 Pedro Alves <palves@redhat.com>
{
struct ui_file *ui_out = mem_fileopen ();
struct cleanup *cleanups = make_cleanup_ui_file_delete (ui_out);
- char *expanded;
ui_printf (arg, ui_out);
- expanded = ui_file_xstrdup (ui_out, NULL);
- make_cleanup (xfree, expanded);
+ std::string expanded = ui_file_as_string (ui_out);
- execute_command (expanded, from_tty);
+ execute_command (&expanded[0], from_tty);
do_cleanups (cleanups);
}