+2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
+ than a fixed size buffer.
+
2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
* breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
cli_ui_out::do_field_int (int fldno, int width, ui_align alignment,
const char *fldname, int value)
{
- char buffer[20]; /* FIXME: how many chars long a %d can become? */
-
if (m_suppress_output)
return;
- xsnprintf (buffer, sizeof (buffer), "%d", value);
+ std::string str = string_printf ("%d", value);
- do_field_string (fldno, width, alignment, fldname, buffer);
+ do_field_string (fldno, width, alignment, fldname, str.c_str ());
}
/* used to omit a field */