diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-02-12 00:07:34 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-02-12 00:07:34 +0000 |
commit | 69b3834a38a023121de3259ef0380115100f69d8 (patch) | |
tree | b8f8401d334f7cac4318655d34c161d4d045f42d /file_io | |
parent | aff2d223444beb748cc6d6281ea74dcc4bd20138 (diff) | |
download | libapr-69b3834a38a023121de3259ef0380115100f69d8.tar.gz |
I don't trust that the OS is even returning an error - if the handle
is an invalid handle - I'm not certain that's an error. Certainly
this code is safer - merits pushing into .32
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62945 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/win32/open.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/file_io/win32/open.c b/file_io/win32/open.c index 4cd802813..db89eae89 100644 --- a/file_io/win32/open.c +++ b/file_io/win32/open.c @@ -534,7 +534,7 @@ APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile, apr_pool_t file_handle = GetStdHandle(STD_ERROR_HANDLE); if (file_handle == INVALID_HANDLE_VALUE) - return apr_get_os_error(); + return APR_EINVAL; return apr_os_file_put(thefile, &file_handle, 0, cont); } @@ -545,7 +545,7 @@ APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile, apr_pool_t file_handle = GetStdHandle(STD_OUTPUT_HANDLE); if (file_handle == INVALID_HANDLE_VALUE) - return apr_get_os_error(); + return APR_EINVAL; return apr_os_file_put(thefile, &file_handle, 0, cont); } @@ -556,7 +556,7 @@ APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile, apr_pool_t * file_handle = GetStdHandle(STD_INPUT_HANDLE); if (file_handle == INVALID_HANDLE_VALUE) - return apr_get_os_error(); + return APR_EINVAL; return apr_os_file_put(thefile, &file_handle, 0, cont); } |