diff options
author | Christopher Faylor <me@cgf.cx> | 2008-12-22 19:18:00 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2008-12-22 19:18:00 +0000 |
commit | 6ef31d2336b2a7b3eed261c095ccb91230729033 (patch) | |
tree | cf8d20d545186645ee43e6a9523df1e22e1e03db /winsup/cygwin/pipe.cc | |
parent | 16c40518c0748a44cd1016df9124889ac6e16593 (diff) | |
download | newlib-6ef31d2336b2a7b3eed261c095ccb91230729033.zip newlib-6ef31d2336b2a7b3eed261c095ccb91230729033.tar.gz newlib-6ef31d2336b2a7b3eed261c095ccb91230729033.tar.bz2 |
* pipe.cc (getov_result): Minor cleanup.
Diffstat (limited to 'winsup/cygwin/pipe.cc')
-rw-r--r-- | winsup/cygwin/pipe.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index 5b5a55a..cfc3f04 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -42,7 +42,7 @@ inline bool getov_result (BOOL res, bool reading, HANDLE h, DWORD& nbytes, LPOVERLAPPED ov) { DWORD err = GetLastError (); - if (res || (reading && ov && !res && err == ERROR_HANDLE_EOF)) + if (res || (reading && ov && err == ERROR_HANDLE_EOF)) /* not an error */; else if (!ov || (err != ERROR_IO_PENDING) || (!GetOverlappedResult (h, ov, &nbytes, true) @@ -70,7 +70,6 @@ pipe_handler (LPVOID in_ps) SetHandleInformation (h, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT); SetEvent (ps.ev); - char buf[4096]; DWORD read_bytes, write_bytes; HANDLE hread, hwrite, hclose; OVERLAPPED ov, *rov, *wov; @@ -91,6 +90,7 @@ pipe_handler (LPVOID in_ps) wov = NULL; } + char buf[4096]; while (1) { ResetEvent (ov.hEvent); @@ -151,7 +151,6 @@ out: CloseHandle (ev); ev = NULL; } - return; } void |