Skip to content

Commit

Permalink
code lint
Browse files Browse the repository at this point in the history
  • Loading branch information
XUranus committed Nov 3, 2023
1 parent b085356 commit bfa5148
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion include/common/BlockingQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class BlockingQueue {

template<typename T>
BlockingQueue<T>::BlockingQueue(std::size_t maxSize)
: m_finished(false), m_maxSize(maxSize)
: m_finished(false), m_maxSize(maxSize)
{}

/**
Expand Down
5 changes: 2 additions & 3 deletions src/native/TaskResourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ static bool CreateFragmentBinaryBackupCopy(
static bool FragmentBinaryBackupCopyExists(std::vector<std::string> fragmentFiles)
{
for (const std::string& fragmentFile : fragmentFiles) {
ErrCodeType errorCode = 0;
if (!fsapi::IsFileExists(fragmentFile)) {
INFOLOG("fragment binary file %s not exists", fragmentFile.c_str());
return false;
Expand Down Expand Up @@ -222,9 +221,9 @@ bool TaskResourceManager::DetachCopyResource()
// implement BackupTaskResourceManager...
BackupTaskResourceManager::BackupTaskResourceManager(const BackupTaskResourceManagerParams& param)
: TaskResourceManager(param.copyFormat, param.copyDataDirPath, param.copyName),
m_backupType(param.backupType),
m_volumeSize(param.volumeSize),
m_maxSessionSize(param.maxSessionSize),
m_backupType(param.backupType)
m_maxSessionSize(param.maxSessionSize)
{};

BackupTaskResourceManager::~BackupTaskResourceManager()
Expand Down
2 changes: 1 addition & 1 deletion src/native/win32/Win32RawIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ bool rawio::win32::GetVirtualDiskPhysicalDrivePath(
}

opStatus = ::GetVirtualDiskPhysicalPath(hVirtualDiskFile, &wPhysicalDriveNameLength, wPhysicalDriveName);
if(opStatus != ERROR_SUCCESS) { // Unable to retrieve virtual disk path
if (opStatus != ERROR_SUCCESS) { // Unable to retrieve virtual disk path
errorCode = opStatus;
::CloseHandle(hVirtualDiskFile);
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/task/VolumeBlockReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ VolumeBlockReader::~VolumeBlockReader()
}

VolumeBlockReader::VolumeBlockReader(const VolumeBlockReaderParam& param)
: m_sourceType(param.sourceType),
: m_sourceType(param.sourceType),
m_sourcePath(param.sourcePath),
m_baseOffset(param.sourceOffset),
m_sharedConfig(param.sharedConfig),
Expand Down
8 changes: 4 additions & 4 deletions src/task/VolumeProtectTaskContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,9 @@ std::shared_ptr<CheckpointSnapshot> CheckpointSnapshot::LoadFrom(const std::stri
}
auto checkpointSnapshot = std::make_shared<CheckpointSnapshot>(bitmapBytes);
uint64_t offset = 0;
memcpy(checkpointSnapshot->processedBitmapBuffer, buffer + offset, sizeof(uint8_t) * bitmapBytes);
memcpy(checkpointSnapshot->processedBitmapBuffer,buffer + offset, sizeof(uint8_t) * bitmapBytes);
offset += bitmapBytes;
memcpy(checkpointSnapshot->writtenBitmapBuffer, buffer + offset , sizeof(uint8_t) * bitmapBytes);
memcpy(checkpointSnapshot->writtenBitmapBuffer,buffer + offset, sizeof(uint8_t) * bitmapBytes);
delete[] buffer;
return checkpointSnapshot;
}
Expand Down Expand Up @@ -472,9 +472,9 @@ bool VolumeTaskCheckpointTrait::RestoreSessionBitmap(std::shared_ptr<VolumeTaskS
return false;
}
session->sharedContext->processedBitmap = std::make_shared<Bitmap>(
checkpointSnapshot->processedBitmapBuffer , checkpointSnapshot->bitmapBufferBytesLength);
checkpointSnapshot->processedBitmapBuffer ,checkpointSnapshot->bitmapBufferBytesLength);
session->sharedContext->writtenBitmap = std::make_shared<Bitmap>(
checkpointSnapshot->writtenBitmapBuffer , checkpointSnapshot->bitmapBufferBytesLength);
checkpointSnapshot->writtenBitmapBuffer ,checkpointSnapshot->bitmapBufferBytesLength);
checkpointSnapshot->writtenBitmapBuffer = nullptr;
checkpointSnapshot->processedBitmapBuffer = nullptr;
DBGLOG("restore session bitmap from %s success", checkpointFilePath.c_str());
Expand Down
1 change: 1 addition & 0 deletions test/VolumeBackupTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

using namespace ::testing;
using namespace volumeprotect;
using namespace volumeprotect::task;

namespace {
constexpr auto DEFAULT_MOCK_SESSION_BLOCK_SIZE = 4LLU * ONE_MB;
Expand Down

0 comments on commit bfa5148

Please sign in to comment.