summaryrefslogtreecommitdiff
path: root/file_io
diff options
context:
space:
mode:
authorIvan Zhakov <ivan@apache.org>2019-05-27 07:13:06 +0000
committerIvan Zhakov <ivan@apache.org>2019-05-27 07:13:06 +0000
commitcc1441276000e5bb8bfc116f505f69361c39a357 (patch)
treeed8008de375db4be2186c8406adebb0daea92472 /file_io
parenta24e8ff255163cf5af98f6f684c0d3ad17f945c7 (diff)
downloadapr-cc1441276000e5bb8bfc116f505f69361c39a357.tar.gz
* file_io/win32/open.c
(read_with_timeout): Reduce local variable scope. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860109 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r--file_io/win32/readwrite.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/file_io/win32/readwrite.c b/file_io/win32/readwrite.c
index 310d7905a..31c14fcbb 100644
--- a/file_io/win32/readwrite.c
+++ b/file_io/win32/readwrite.c
@@ -31,7 +31,6 @@
static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t len_in, apr_size_t *nbytes)
{
apr_status_t rv;
- DWORD res;
DWORD len = (DWORD)len_in;
DWORD bytesread = 0;
@@ -80,6 +79,8 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le
else {
rv = apr_get_os_error();
if (rv == APR_FROM_OS_ERROR(ERROR_IO_PENDING)) {
+ DWORD res;
+
/* It seems that ReadFile() return ERROR_IO_PENDING even
* when I/O operation completed syncronously.
* Use fast macro to check that overlapped I/O already