bugfix/ai-static-analysis #82

Open
localhorst wants to merge 15 commits from bugfix/ai-static-analysis into master
2 changed files with 14 additions and 14 deletions
Showing only changes of commit ff6a1763e0 - Show all commits

View File

@ -326,27 +326,27 @@ void reHDD::searchDrives(std::list<Drive> *plistDrives)
if (devName.empty()) if (devName.empty())
continue; continue;
Drive *tmpDrive = new Drive("/dev/" + devName); Drive tmpDrive("/dev/" + devName);
tmpDrive->state = Drive::NONE; tmpDrive.state = Drive::NONE;
tmpDrive->bIsOffline = false; tmpDrive.bIsOffline = false;
// Set connection type // Set connection type
if (transport == "sata") if (transport == "sata")
tmpDrive->connectionType = Drive::SATA; tmpDrive.connectionType = Drive::SATA;
else if (transport == "usb") else if (transport == "usb")
tmpDrive->connectionType = Drive::USB; tmpDrive.connectionType = Drive::USB;
else if (transport == "nvme") else if (transport == "nvme")
tmpDrive->connectionType = Drive::NVME; tmpDrive.connectionType = Drive::NVME;
else else
tmpDrive->connectionType = Drive::UNKNOWN; tmpDrive.connectionType = Drive::UNKNOWN;
plistDrives->push_back(*tmpDrive); plistDrives->push_back(tmpDrive);
Logger::logThis()->info( Logger::logThis()->info(
"Drive found: " + tmpDrive->getPath() + "Drive found: " + tmpDrive.getPath() +
" (type: " + " (type: " +
(tmpDrive->connectionType == Drive::USB ? "USB" : tmpDrive->connectionType == Drive::SATA ? "SATA" (tmpDrive.connectionType == Drive::USB ? "USB" : tmpDrive.connectionType == Drive::SATA ? "SATA"
: tmpDrive->connectionType == Drive::NVME ? "NVME" : tmpDrive.connectionType == Drive::NVME ? "NVME"
: "UNKNOWN") + : "UNKNOWN") +
")"); ")");
} }