summaryrefslogtreecommitdiff
path: root/file_io
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2006-02-28 21:33:54 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2006-02-28 21:33:54 +0000
commit61e88e38ed20d99b3154b39b293175b44538cb99 (patch)
tree7ab37fbb0e8a1d69acebb60b8e3cc1ae15510afc /file_io
parenteeab09f47f48f06f31139d53bbb5126e4120d5db (diff)
downloadapr-61e88e38ed20d99b3154b39b293175b44538cb99.tar.gz
Several readwrite fixes require this code to become legible,
so pre-prettify the code to match conventional style. No effective change. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@381788 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r--file_io/win32/readwrite.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/file_io/win32/readwrite.c b/file_io/win32/readwrite.c
index 3b0f62c34..b57b61241 100644
--- a/file_io/win32/readwrite.c
+++ b/file_io/win32/readwrite.c
@@ -86,23 +86,28 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le
rv = WaitForSingleObject(file->pOverlapped->hEvent, INFINITE);
}
switch (rv) {
- case WAIT_OBJECT_0:
- GetOverlappedResult(file->filehand, file->pOverlapped,
- (LPDWORD)nbytes, TRUE);
- rv = APR_SUCCESS;
- break;
- case WAIT_TIMEOUT:
- rv = APR_TIMEUP;
- break;
- case WAIT_FAILED:
- rv = apr_get_os_error();
- break;
- default:
- break;
+ case WAIT_OBJECT_0:
+ GetOverlappedResult(file->filehand, file->pOverlapped,
+ (LPDWORD)nbytes, TRUE);
+ rv = APR_SUCCESS;
+ break;
+
+ case WAIT_TIMEOUT:
+ rv = APR_TIMEUP;
+ break;
+
+ case WAIT_FAILED:
+ rv = apr_get_os_error();
+ break;
+
+ default:
+ break;
}
+
if (rv != APR_SUCCESS) {
- if (apr_os_level >= APR_WIN_98)
+ if (apr_os_level >= APR_WIN_98) {
CancelIo(file->filehand);
+ }
}
}
else if (rv == APR_FROM_OS_ERROR(ERROR_BROKEN_PIPE)) {