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;