Skip to content

Commit 421dd31

Browse files
SergeGautherielearn-more
authored andcommitted
[FORMAT] wmain(): Clean GetDiskFreeSpaceExW() calls up
1 parent 982cf2b commit 421dd31

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

base/system/format/format.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ int wmain(int argc, WCHAR *argv[])
367367
WCHAR volumeName[1024] = {0};
368368
WCHAR input[1024];
369369
DWORD serialNumber;
370-
ULARGE_INTEGER freeBytesAvailableToCaller, totalNumberOfBytes, totalNumberOfFreeBytes;
370+
ULARGE_INTEGER totalNumberOfBytes, totalNumberOfFreeBytes;
371371
WCHAR szMsg[RC_STRING_MAX_SIZE];
372372

373373
/* Initialize the Console Standard Streams */
@@ -501,9 +501,9 @@ int wmain(int argc, WCHAR *argv[])
501501
* Fallback to GetFreeDiskSpaceExW if we did not get any volume length. */
502502
if (totalNumberOfBytes.QuadPart == 0 &&
503503
!GetDiskFreeSpaceExW(RootDirectory,
504-
&freeBytesAvailableToCaller,
504+
NULL,
505505
&totalNumberOfBytes,
506-
&totalNumberOfFreeBytes))
506+
NULL))
507507
{
508508
K32LoadStringW(GetModuleHandle(NULL), STRING_NO_VOLUME_SIZE, szMsg, ARRAYSIZE(szMsg));
509509
PrintWin32Error(szMsg, GetLastError());
@@ -612,10 +612,10 @@ int wmain(int argc, WCHAR *argv[])
612612
}
613613

614614
//
615-
// Print out some stuff including the formatted size
615+
// Get and print out some stuff including the formatted size
616616
//
617617
if (!GetDiskFreeSpaceExW(RootDirectory,
618-
&freeBytesAvailableToCaller,
618+
NULL,
619619
&totalNumberOfBytes,
620620
&totalNumberOfFreeBytes))
621621
{

0 commit comments

Comments
 (0)