aboutsummaryrefslogtreecommitdiff
path: root/gdb/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/serial.c')
-rw-r--r--gdb/serial.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/serial.c b/gdb/serial.c
index 0239fc8..fb2b212 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -434,16 +434,14 @@ serial_write (struct serial *scb, const void *buf, size_t count)
}
void
-serial_printf (struct serial *desc, const char *format,...)
+serial_printf (struct serial *desc, const char *format, ...)
{
va_list args;
- char *buf;
va_start (args, format);
- buf = xstrvprintf (format, args);
- serial_write (desc, buf, strlen (buf));
+ std::string buf = string_vprintf (format, args);
+ serial_write (desc, buf.c_str (), buf.length ());
- xfree (buf);
va_end (args);
}