Remove a use of n_spaces
authorTom Tromey <tromey@adacore.com>
Thu, 17 Dec 2020 20:37:20 +0000 (13:37 -0700)
committerTom Tromey <tromey@adacore.com>
Thu, 17 Dec 2020 20:47:03 +0000 (13:47 -0700)
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.

gdb/ChangeLog
gdb/printcmd.c

index d1b9b3808212cffbfe194ee0e2a461569ba87025..c7eeb1e676e452fe3bd8314e1a01edc653f78458 100644 (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)
index e95b88029501c4da655a8d051d07346560126b1c..de083a2a7681585bf9f1647660d89e70afc0f330 100644 (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
This page took 0.0334179999999999 seconds and 4 git commands to generate.