From 8a8a25695351ee542f08886a9d0957c78c6af366 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 28 Apr 2021 18:30:00 -0500 Subject: Clean up 32-bit assumptions. --- src/ca/XmlFile.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/ca/XmlFile.cpp') diff --git a/src/ca/XmlFile.cpp b/src/ca/XmlFile.cpp index 95f18411..04a4ae98 100644 --- a/src/ca/XmlFile.cpp +++ b/src/ca/XmlFile.cpp @@ -854,7 +854,6 @@ extern "C" UINT __stdcall ExecXmlFileRollback( LPWSTR pwzFileName = NULL; LPBYTE pbData = NULL; DWORD_PTR cbData = 0; - DWORD cbDataWritten = 0; FILETIME ft; @@ -913,10 +912,8 @@ extern "C" UINT __stdcall ExecXmlFileRollback( ExitOnInvalidHandleWithLastError(hFile, hr, "failed to open file: %ls", pwzFileName); // Write out the old data - if (!::WriteFile(hFile, pbData, (DWORD)cbData, &cbDataWritten, NULL)) - ExitOnLastError(hr, "failed to write to file: %ls", pwzFileName); - - Assert(cbData == cbDataWritten); + hr = FileWriteHandle(hFile, pbData, cbData); + ExitOnFailure(hr, "failed to write to file: %ls", pwzFileName); ReleaseFile(hFile); -- cgit v1.2.3-55-g6feb