You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@hyperreal.org on 2000/02/01 01:44:37 UTC

cvs commit: apache-2.0/src/lib/apr/file_io/win32 dir.c

stoddard    00/01/31 16:44:36

  Modified:    src/lib/apr/file_io/win32 dir.c
  Log:
  CloseHandle() returns 0 on failure
  
  Revision  Changes    Path
  1.10      +3 -5      apache-2.0/src/lib/apr/file_io/win32/dir.c
  
  Index: dir.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/dir.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- dir.c	2000/01/11 23:23:49	1.9
  +++ dir.c	2000/02/01 00:44:34	1.10
  @@ -76,12 +76,10 @@
   ap_status_t dir_cleanup(void *thedir)
   {
       struct dir_t *dir = thedir;
  -    if (CloseHandle(dir->dirhand) == 0) {
  -        return APR_SUCCESS;
  +    if (!CloseHandle(dir->dirhand)) {
  +        return GetLastError();
       }
  -    else {
  -        return errno;
  -    }
  +    return APR_SUCCESS;
   } 
   
   ap_status_t ap_opendir(struct dir_t **new, const char *dirname, ap_context_t *cont)