small fixes and refactoring

This commit is contained in:
2021-06-05 14:42:20 +02:00
parent 5ff344eee2
commit a35fdbc5dc
7 changed files with 35 additions and 29 deletions
+4 -4
View File
@@ -38,15 +38,15 @@ ReturnValue_t UartComIF::initializeInterface(CookieIF * cookie) {
}
size_t maxReplyLen = uartCookie->getMaxReplyLen();
UartElements_t uartElements = {fileDescriptor, std::vector<uint8_t>(maxReplyLen), 0};
std::pair status = uartDeviceMap.emplace(deviceFile, uartElements);
auto status = uartDeviceMap.emplace(deviceFile, uartElements);
if (status.second == false) {
sif::debug << "UartComIF::initializeInterface: Failed to insert device " << deviceFile
<< "to Uart device map" << std::endl;
sif::debug << "UartComIF::initializeInterface: Failed to insert device " << deviceFile
<< "to UART device map" << std::endl;
return RETURN_FAILED;
}
}
else {
sif::debug << "UartComIF::initializeInterface: Uart device " << deviceFile << "already in "
sif::debug << "UartComIF::initializeInterface: UART device " << deviceFile << " already in "
<< "use" << std::endl;
return RETURN_FAILED;
}