From 899500d6a4fb46ad1a0f8d076e2a5c2ce34f9d1a Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Mon, 28 Feb 2011 22:20:05 +0000 Subject: [PATCH] 2011-02-28 Michael Snyder * utils.c (nquery): Call va_end before return; (yquery): Ditto. (query): Ditto. --- gdb/ChangeLog | 4 ++++ gdb/utils.c | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3ca7412f9fe..d27cacad7c2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2011-02-28 Michael Snyder + * 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 diff --git a/gdb/utils.c b/gdb/utils.c index 82e3adbafb7..46685155530 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 -- 2.30.2