From: jimb Date: Tue, 30 Mar 2004 15:44:08 +0000 (+0000) Subject: From Ulrich Weigand: X-Git-Tag: reparent-point~3241 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d2e19d560448e0cd9a57e559f8196835d3b029db;p=pf3gnuchains%2Fpf3gnuchains4x.git From Ulrich Weigand: * utils.c (query): Do not use a va_list variable multiple times. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cf32cf6023..f45dc68ec9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2004-03-30 Jim Blandy + + From Ulrich Weigand: + * utils.c (query): Do not use a va_list variable multiple times. + 2004-03-29 Daniel Jacobowitz * Makefile.in (linux_nat_h): Update dependencies. diff --git a/gdb/utils.c b/gdb/utils.c index 3bc5fed2a3..a5b28c1258 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1270,10 +1270,9 @@ query (const char *ctlstr, ...) int ans2; int retval; - va_start (args, ctlstr); - if (query_hook) { + va_start (args, ctlstr); return query_hook (ctlstr, args); } @@ -1289,7 +1288,9 @@ query (const char *ctlstr, ...) if (annotation_level > 1) printf_filtered ("\n\032\032pre-query\n"); + va_start (args, ctlstr); vfprintf_filtered (gdb_stdout, ctlstr, args); + va_end (args); printf_filtered ("(y or n) "); if (annotation_level > 1)