Fix thinko on last commit

Message ID 20170220130451.27942-1-sergiodj@redhat.com
State New, archived
Headers

Commit Message

Sergio Durigan Junior Feb. 20, 2017, 1:04 p.m. UTC
  On fork-child.c:trace_start_error, va_end should refer to 'ap', not
'args.  This fixes it.

Sorry about the breakage.

gdb/ChangeLog:
2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR gdb/16188
	* fork-child.c (trace_start_error): Fix thinko.  va_end should
	refer to 'ap', not 'args'.
---
 gdb/ChangeLog    | 6 ++++++
 gdb/fork-child.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
  

Comments

Sergio Durigan Junior Feb. 20, 2017, 1:08 p.m. UTC | #1
On Monday, February 20 2017, I wrote:

> On fork-child.c:trace_start_error, va_end should refer to 'ap', not
> 'args.  This fixes it.

I've pushed this as obvious.

> Sorry about the breakage.
>
> gdb/ChangeLog:
> 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
>
> 	PR gdb/16188
> 	* fork-child.c (trace_start_error): Fix thinko.  va_end should
> 	refer to 'ap', not 'args'.
> ---
>  gdb/ChangeLog    | 6 ++++++
>  gdb/fork-child.c | 2 +-
>  2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> index cf68c7e..610755c 100644
> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,4 +1,10 @@
>  2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
> +
> +	PR gdb/16188
> +	* fork-child.c (trace_start_error): Fix thinko.  va_end should
> +	refer to 'ap', not 'args'.
> +
> +2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
>  	    Pedro Alves  <palves@redhat.com>
>  
>  	PR gdb/16188
> diff --git a/gdb/fork-child.c b/gdb/fork-child.c
> index f6256fb..dc2a314 100644
> --- a/gdb/fork-child.c
> +++ b/gdb/fork-child.c
> @@ -120,7 +120,7 @@ trace_start_error (const char *fmt, ...)
>    fprintf_unfiltered (gdb_stderr, "Could not trace the inferior "
>  		                  "process.\nError: ");
>    vfprintf_unfiltered (gdb_stderr, fmt, ap);
> -  va_end (args);
> +  va_end (ap);
>  
>    gdb_flush (gdb_stderr);
>    _exit (0177);
> -- 
> 2.9.3
  

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cf68c7e..610755c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,4 +1,10 @@ 
 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	PR gdb/16188
+	* fork-child.c (trace_start_error): Fix thinko.  va_end should
+	refer to 'ap', not 'args'.
+
+2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
 	    Pedro Alves  <palves@redhat.com>
 
 	PR gdb/16188
diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index f6256fb..dc2a314 100644
--- a/gdb/fork-child.c
+++ b/gdb/fork-child.c
@@ -120,7 +120,7 @@  trace_start_error (const char *fmt, ...)
   fprintf_unfiltered (gdb_stderr, "Could not trace the inferior "
 		                  "process.\nError: ");
   vfprintf_unfiltered (gdb_stderr, fmt, ap);
-  va_end (args);
+  va_end (ap);
 
   gdb_flush (gdb_stderr);
   _exit (0177);