Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-12-10 22:12:28 +0400
committerChristopher Faylor <me@cgf.cx>2011-12-10 22:12:28 +0400
commit83ebb09239a9537ecc15c7aa4a90a0830f5bba15 (patch)
tree1383b9b900cfec1e265c752b92bfb34acaf3a29e /winsup/cygwin/sigproc.h
parentbc1d321c570c5f7f17fcd559cd8e04a3fbd05aeb (diff)
* sigproc.h (cygwait): Delete duplicate va_start and add matching va_end.
Diffstat (limited to 'winsup/cygwin/sigproc.h')
-rw-r--r--winsup/cygwin/sigproc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
index 6a8d7aec2..b0817360c 100644
--- a/winsup/cygwin/sigproc.h
+++ b/winsup/cygwin/sigproc.h
@@ -85,11 +85,13 @@ static inline DWORD
cygwait (DWORD n, DWORD howlong, ...)
{
va_list ap;
- va_start (ap, howlong);
HANDLE w4[n + 2];
+
va_start (ap, howlong);
for (unsigned i = 0; i < n; i++)
w4[i] = va_arg (ap, HANDLE);
+ va_end (ap);
+
w4[n++] = signal_arrived;
if ((w4[n] = pthread::get_cancel_event ()) != NULL)
n++;