From 421dd31d4974af529e1cce92be2b33a705b0b928 Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Thu, 17 Oct 2024 00:45:29 +0200 Subject: [PATCH] [FORMAT] wmain(): Clean GetDiskFreeSpaceExW() calls up --- base/system/format/format.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/base/system/format/format.c b/base/system/format/format.c index f51d15aa199..20d82a6b6c5 100644 --- a/base/system/format/format.c +++ b/base/system/format/format.c @@ -367,7 +367,7 @@ int wmain(int argc, WCHAR *argv[]) WCHAR volumeName[1024] = {0}; WCHAR input[1024]; DWORD serialNumber; - ULARGE_INTEGER freeBytesAvailableToCaller, totalNumberOfBytes, totalNumberOfFreeBytes; + ULARGE_INTEGER totalNumberOfBytes, totalNumberOfFreeBytes; WCHAR szMsg[RC_STRING_MAX_SIZE]; /* Initialize the Console Standard Streams */ @@ -501,9 +501,9 @@ int wmain(int argc, WCHAR *argv[]) * Fallback to GetFreeDiskSpaceExW if we did not get any volume length. */ if (totalNumberOfBytes.QuadPart == 0 && !GetDiskFreeSpaceExW(RootDirectory, - &freeBytesAvailableToCaller, + NULL, &totalNumberOfBytes, - &totalNumberOfFreeBytes)) + NULL)) { K32LoadStringW(GetModuleHandle(NULL), STRING_NO_VOLUME_SIZE, szMsg, ARRAYSIZE(szMsg)); PrintWin32Error(szMsg, GetLastError()); @@ -612,10 +612,10 @@ int wmain(int argc, WCHAR *argv[]) } // - // Print out some stuff including the formatted size + // Get and print out some stuff including the formatted size // if (!GetDiskFreeSpaceExW(RootDirectory, - &freeBytesAvailableToCaller, + NULL, &totalNumberOfBytes, &totalNumberOfFreeBytes)) {