apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: cvs commit: apr/file_io/win32 open.c
Date Tue, 12 Feb 2002 19:18:57 GMT
wrowe@apache.org wrote:

>wrowe       02/02/11 16:07:34
>
>  Modified:    file_io/win32 open.c
>  Log:
>    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
>  
>  Revision  Changes    Path
>  1.93      +3 -3      apr/file_io/win32/open.c
>  
>  Index: open.c
>  ===================================================================
>  RCS file: /home/cvs/apr/file_io/win32/open.c,v
>  retrieving revision 1.92
>  retrieving revision 1.93
>  diff -u -r1.92 -r1.93
>  --- open.c	29 Jan 2002 05:49:21 -0000	1.92
>  +++ open.c	12 Feb 2002 00:07:34 -0000	1.93
>  @@ -534,7 +534,7 @@
>   
>       file_handle = GetStdHandle(STD_ERROR_HANDLE);
>       if (file_handle == INVALID_HANDLE_VALUE)
>  -        return apr_get_os_error();
>  +        return APR_EINVAL;
>
...

 From MSDN:

    Return Values
    If the function succeeds, the return value is a handle to the
    specified device.

    If the function fails, the return value is the INVALID_HANDLE_VALUE
    flag. To get extended error information, call GetLastError.




-- 
Brane ─îibej   <brane@xbc.nu>   http://www.xbc.nu/brane/




Mime
View raw message