* [pushed] Remove a use of n_spaces
@ 2020-12-17 20:47 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2020-12-17 20:47 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
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 | 4 ++++
gdb/printcmd.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
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
--
2.26.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-17 20:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 20:47 [pushed] Remove a use of n_spaces Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).