]> cygwin.com Git - cygwin-apps/setup.git/commitdiff
* download.cc (get_file_size): Check for INVALID_HANDLE_VALUE instead
authorCorinna Vinschen <corinna@vinschen.de>
Wed, 21 Feb 2001 12:06:28 +0000 (12:06 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 21 Feb 2001 12:06:28 +0000 (12:06 +0000)
for NULL.

ChangeLog
download.cc

index d9b20e2005a558d62f4c905f03c767df79bd6430..63569aedef4c561430769901bec94fb37bbc851a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-Wed Feb 21 18:59:00 2000  Corinna Vinschen <vinschen@redhat.com>
+Wed Feb 21 13:05:00 2000  Corinna Vinschen <vinschen@redhat.com>
+
+       * download.cc (get_file_size): Check for INVALID_HANDLE_VALUE instead
+       for NULL.
+
+Wed Feb 21 11:21:00 2000  Corinna Vinschen <vinschen@redhat.com>
 
        * download.cc (download_one): Add missing parenthesis.
 
index 6d914aec5099ece989a08cd784f225e69d72d746..dfca299ecfb8c2e3c40e0a0ead7761406e3e245f 100644 (file)
@@ -21,8 +21,6 @@ static char *cvsid = "\n%%% $Id$\n";
 #include "win32.h"
 
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 
 #include "resource.h"
 #include "msg.h"
@@ -44,7 +42,7 @@ get_file_size (char *name)
   DWORD ret = 0;
 
   h = FindFirstFileA (name, &buf);
-  if (h)
+  if (h != INVALID_HANDLE_VALUE)
     {
       if (buf.nFileSizeHigh == 0)
        ret = buf.nFileSizeLow;
This page took 0.041439 seconds and 5 git commands to generate.