From 2b2cc75f6b5ba4b347207b8e5a136d0b8b0413cc Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 29 Mar 2004 14:08:44 +0000 Subject: [PATCH] * net.cc (wsock_event::wait): Change scope of local "len" variable. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/net.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 42e3577bf..694396a2f 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2004-03-29 Corinna Vinschen + + * net.cc (wsock_event::wait): Change scope of local "len" variable. + 2004-03-28 Corinna Vinschen * shm.cc (shmat): Return (void *) -1 on error instead of NULL. diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 8f0f555ea..8c4090b28 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -74,11 +74,11 @@ wsock_event::wait (int socket, LPDWORD flags) { int ret = -1; WSAEVENT ev[2] = { event, signal_arrived }; + DWORD len; switch (WSAWaitForMultipleEvents (2, ev, FALSE, WSA_INFINITE, FALSE)) { case WSA_WAIT_EVENT_0: - DWORD len; if (WSAGetOverlappedResult (socket, &ovr, &len, FALSE, flags)) ret = (int) len; break;