]> granicus.if.org Git - curl/commitdiff
Use the S_ISREG macro to determine what is a regular file
authorDan Fandrich <dan@coneharvesters.com>
Thu, 19 Aug 2010 18:45:54 +0000 (11:45 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Thu, 19 Aug 2010 18:49:01 +0000 (11:49 -0700)
src/main.c

index 3b78d602f6d4c9c245b2aea2864a53c0da6caad2..e5279aa4ffce895e0f38648a9d61fa660f2d9149 100644 (file)
@@ -4927,7 +4927,7 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
           infdopen=TRUE;
 
           /* we ignore file size for char/block devices, sockets, etc. */
-          if(S_IFREG == (fileinfo.st_mode & S_IFMT))
+          if(S_ISREG(fileinfo.st_mode))
             uploadfilesize=fileinfo.st_size;
 
         }