Minor style improvement

This commit is contained in:
Avamander 2021-06-16 23:31:40 +03:00
parent 6e16584816
commit 4349657f79

View File

@ -53,8 +53,9 @@ int AlertNotificationService::OnAlert(uint16_t conn_handle, uint16_t attr_handle
// Ignore notifications with empty message
const auto packetLen = OS_MBUF_PKTLEN(ctxt->om);
if (packetLen <= headerSize)
if (packetLen <= headerSize) {
return 0;
}
size_t bufferSize = std::min(packetLen + stringTerminatorSize, maxBufferSize);
auto messageSize = std::min(maxMessageSize, (bufferSize - headerSize));