From 8176232ddc752350e6d274947ad7eabb6b502276 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 21 Dec 2011 18:34:57 +0000 Subject: [PATCH] * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Use correct value in switch statement. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 039affeba..03d43a459 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2011-12-21 Christopher Faylor + + * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Use correct + value in switch statement. + 2011-12-11 Corinna Vinschen * dcrt0.cc (_dll_crt0): Rephrase comments. Set $ebp to NULL, as in diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index a93b45436..5fade14e5 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1931,7 +1931,7 @@ fhandler_base_overlapped::wait_overlapped (bool inres, bool writing, DWORD *byte BOOL wores; if (isclosed ()) { - switch (err) + switch (wfres) { case WAIT_OBJECT_0: err = ERROR_INVALID_HANDLE;