aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
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 /gdb/utils.c
parent0480cefa09d877efdf739625165cf72ef91c710c (diff)
downloadfsf-binutils-gdb-899500d6a4fb46ad1a0f8d076e2a5c2ce34f9d1a.zip
fsf-binutils-gdb-899500d6a4fb46ad1a0f8d076e2a5c2ce34f9d1a.tar.gz
fsf-binutils-gdb-899500d6a4fb46ad1a0f8d076e2a5c2ce34f9d1a.tar.bz2
2011-02-28 Michael Snyder <msnyder@vmware.com>
* utils.c (nquery): Call va_end before return; (yquery): Ditto. (query): Ditto.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c12
1 files changed, 9 insertions, 3 deletions
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