Patchwork [RFA] Fix incorrect string_printf use in utils.c

login
register
mail settings
Submitter Tom Tromey
Date Oct. 3, 2017, 2:36 p.m.
Message ID <20171003143616.3698-1-tom@tromey.com>
Download mbox | patch
Permalink /patch/23298/
State New
Headers show

Comments

Tom Tromey - Oct. 3, 2017, 2:36 p.m.
I made a mistake earlier and used string_printf where I should have used
string_vprintf.

I'm checking this in as obvious.

2017-10-03  Tom Tromey  <tom@tromey.com>

	* utils.c (internal_vproblem): Use string_vprintf.
---
 gdb/ChangeLog | 4 ++++
 gdb/utils.c   | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 439df4a..6e135f2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@ 
 2017-10-03  Tom Tromey  <tom@tromey.com>
 
+	* utils.c (internal_vproblem): Use string_vprintf.
+
+2017-10-03  Tom Tromey  <tom@tromey.com>
+
 	* printcmd.c (info_symbol_command): Use std::string.
 
 2017-10-03  Tom Tromey  <tom@tromey.com>
diff --git a/gdb/utils.c b/gdb/utils.c
index 03b66c4..118fcc3 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -425,7 +425,7 @@  internal_vproblem (struct internal_problem *problem,
      style similar to a compiler error message.  Include extra detail
      so that the user knows that they are living on the edge.  */
   {
-    std::string msg = string_printf (fmt, ap);
+    std::string msg = string_vprintf (fmt, ap);
     reason = string_printf ("%s:%d: %s: %s\n"
 			    "A problem internal to GDB has been detected,\n"
 			    "further debugging may prove unreliable.",