From: Tom Tromey Date: Thu, 17 Dec 2020 20:37:20 +0000 (-0700) Subject: Remove a use of n_spaces X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=844a65387c55e9637359a8df1a633adb15d8966e;p=binutils-gdb.git 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 * printcmd.c (print_variable_and_value): Don't use n_spaces. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d1b9b380821..c7eeb1e676e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-12-17 Tom Tromey + + * printcmd.c (print_variable_and_value): Don't use n_spaces. + 2020-12-17 Tom Tromey * gdbtypes.c (print_args, dump_fn_fieldlists, print_cplus_stuff) diff --git a/gdb/printcmd.c b/gdb/printcmd.c index e95b8802950..de083a2a768 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -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