aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-02-28 22:20:05 +0000
committerMichael Snyder <msnyder@vmware.com>2011-02-28 22:20:05 +0000
commit899500d6a4fb46ad1a0f8d076e2a5c2ce34f9d1a (patch)
treee55392623ca455db899ed6e0b9f746ea383150aa
parent0480cefa09d877efdf739625165cf72ef91c710c (diff)
downloadgdb-899500d6a4fb46ad1a0f8d076e2a5c2ce34f9d1a.zip
gdb-899500d6a4fb46ad1a0f8d076e2a5c2ce34f9d1a.tar.gz
gdb-899500d6a4fb46ad1a0f8d076e2a5c2ce34f9d1a.tar.bz2
2011-02-28 Michael Snyder <msnyder@vmware.com>
* utils.c (nquery): Call va_end before return; (yquery): Ditto. (query): Ditto.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/utils.c12
2 files changed, 13 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3ca7412..d27caca 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2011-02-28 Michael Snyder <msnyder@vmware.com>
+ * utils.c (nquery): Call va_end before return;
+ (yquery): Ditto.
+ (query): Ditto.
+
* proc-service.c (ps_plog): Call va_end before return.
2011-02-28 Tom Tromey <tromey@redhat.com>
diff --git a/gdb/utils.c b/gdb/utils.c
index 82e3adb..4668515 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1845,10 +1845,12 @@ int
nquery (const char *ctlstr, ...)
{
va_list args;
+ int ret;
va_start (args, ctlstr);
- return defaulted_query (ctlstr, 'n', args);
+ ret = defaulted_query (ctlstr, 'n', args);
va_end (args);
+ return ret;
}
/* Ask user a y-or-n question and return 0 if answer is no, 1 if
@@ -1861,10 +1863,12 @@ int
yquery (const char *ctlstr, ...)
{
va_list args;
+ int ret;
va_start (args, ctlstr);
- return defaulted_query (ctlstr, 'y', args);
+ ret = defaulted_query (ctlstr, 'y', args);
va_end (args);
+ return ret;
}
/* Ask user a y-or-n question and return 1 iff answer is yes.
@@ -1876,10 +1880,12 @@ int
query (const char *ctlstr, ...)
{
va_list args;
+ int ret;
va_start (args, ctlstr);
- return defaulted_query (ctlstr, '\0', args);
+ ret = defaulted_query (ctlstr, '\0', args);
va_end (args);
+ return ret;
}
/* A helper for parse_escape that converts a host character to a