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>
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
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.
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