Remove a use of n_spaces

While removing printfi_filtered, I found a spot that used n_spaces
where the now-ordinary "%*s" approach would do.  This patch makes this
change.

Tested on x86-64 Fedora 32.

gdb/ChangeLog
2020-12-17  Tom Tromey  <tromey@adacore.com>

	* printcmd.c (print_variable_and_value): Don't use n_spaces.
This commit is contained in:
Tom Tromey
2020-12-17 13:37:20 -07:00
parent 32f47895b5
commit 844a65387c
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2020-12-17 Tom Tromey <tromey@adacore.com>
* printcmd.c (print_variable_and_value): Don't use n_spaces.
2020-12-17 Tom Tromey <tromey@adacore.com>
* gdbtypes.c (print_args, dump_fn_fieldlists, print_cplus_stuff)

View File

@ -2258,7 +2258,7 @@ print_variable_and_value (const char *name, struct symbol *var,
if (!name)
name = var->print_name ();
fprintf_filtered (stream, "%s%ps = ", n_spaces (2 * indent),
fprintf_filtered (stream, "%*s%ps = ", 2 * indent, "",
styled_string (variable_name_style.style (), name));
try