diff options
author | Jim Blandy <jimb@codesourcery.com> | 2004-03-30 15:44:16 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2004-03-30 15:44:16 +0000 |
commit | 3e6bb910c3e70024f820373b1e6d14d857dcff4b (patch) | |
tree | 39e15bc242527d954f766b760a4fd78ee40df81b /gdb/utils.c | |
parent | 0949843db222949909c1cc15724459445105ea1b (diff) | |
download | gdb-3e6bb910c3e70024f820373b1e6d14d857dcff4b.zip gdb-3e6bb910c3e70024f820373b1e6d14d857dcff4b.tar.gz gdb-3e6bb910c3e70024f820373b1e6d14d857dcff4b.tar.bz2 |
From Ulrich Weigand:
* utils.c (query): Do not use a va_list variable multiple times.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index 3bc5fed..a5b28c1 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) |