small fixes and refactoring
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user