X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fserial.c;h=fb2b212918cc778ca07407298212b9445013a928;hb=467dc1e2ea5a8b300b61194aa8565829ce7d65bc;hp=0239fc833712518d5682e4b874c2c7fab3938121;hpb=6d52907e226ade45d5f5196eaed8386affda5156;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/serial.c b/gdb/serial.c index 0239fc8337..fb2b212918 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); }