Replace xstrvprintf usages with string_vprintf
[deliverable/binutils-gdb.git] / gdb / serial.c
index 0239fc833712518d5682e4b874c2c7fab3938121..fb2b212918cc778ca07407298212b9445013a928 100644 (file)
@@ -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);
 }
 
This page took 0.024303 seconds and 4 git commands to generate.