]> granicus.if.org Git - php/commitdiff
Simplify constant expression
authorGITSRC <34047788+gitsrc@users.noreply.github.com>
Fri, 20 Dec 2019 14:15:15 +0000 (15:15 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Fri, 20 Dec 2019 14:41:03 +0000 (15:41 +0100)
Co-Authored-By: Christoph M. Becker <cmbecker69@gmx.de>
ext/standard/filestat.c

index f2514d16d2887d26ee518b14f9d6fc040837c324..324bb270651f57e0529d07283080f775071729d1 100644 (file)
@@ -214,9 +214,8 @@ static int php_disk_free_space(char *path, double *space) /* {{{ */
                PHP_WIN32_IOUTIL_CLEANUP_W()
                return FAILURE;
        }
-
-       /* i know - this is ugly, but i works <thies@thieso.net> */
-       *space = FreeBytesAvailableToCaller.HighPart * (double) (((zend_ulong)1) << 31) * 2.0 + FreeBytesAvailableToCaller.LowPart;
+       
+       *space = FreeBytesAvailableToCaller.HighPart * (double) (1ULL << 32)  + FreeBytesAvailableToCaller.LowPart;
 
        PHP_WIN32_IOUTIL_CLEANUP_W()