Skip to content

Commit 269f44f

Browse files
gitsrccmb69
andcommitted
Simplify constant expression
Co-Authored-By: Christoph M. Becker <cmbecker69@gmx.de>
1 parent ed0b788 commit 269f44f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ext/standard/filestat.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,8 @@ static int php_disk_free_space(char *path, double *space) /* {{{ */
214214
PHP_WIN32_IOUTIL_CLEANUP_W()
215215
return FAILURE;
216216
}
217-
218-
/* i know - this is ugly, but i works <thies@thieso.net> */
219-
*space = FreeBytesAvailableToCaller.HighPart * (double) (((zend_ulong)1) << 31) * 2.0 + FreeBytesAvailableToCaller.LowPart;
217+
218+
*space = FreeBytesAvailableToCaller.HighPart * (double) (1ULL << 32) + FreeBytesAvailableToCaller.LowPart;
220219

221220
PHP_WIN32_IOUTIL_CLEANUP_W()
222221

0 commit comments

Comments
 (0)