diff options
author | Pedro Alves <palves@redhat.com> | 2016-10-17 14:11:25 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-10-17 14:39:38 +0100 |
commit | 44ac34e20e54b6bd5b6e7f978b2858744ecff58e (patch) | |
tree | d3473379688ce01e2d927a324723424a296bbffd | |
parent | a28fcc81edf6c97488e27cb8fe64631641119100 (diff) | |
download | binutils-gdb-44ac34e20e54b6bd5b6e7f978b2858744ecff58e.tar.gz |
Use ui_file_as_string in utils.c
gdb/ChangeLog:
yyyy-mm-yy Pedro Alves <palves@redhat.com>
* utils.c (error_stream): Use ui_file_as_string and std::string.
-rw-r--r-- | gdb/utils.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index 71c0e009cac..6feeb4d1b00 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -509,10 +509,9 @@ verror (const char *string, va_list args) void error_stream (struct ui_file *stream) { - char *message = ui_file_xstrdup (stream, NULL); + std::string message = ui_file_as_string (stream); - make_cleanup (xfree, message); - error (("%s"), message); + error (("%s"), message.c_str ()); } /* Emit a message and abort. */ |