Minor style improvement
This commit is contained in:
parent
6e16584816
commit
4349657f79
1 changed files with 2 additions and 1 deletions
|
@ -53,8 +53,9 @@ int AlertNotificationService::OnAlert(uint16_t conn_handle, uint16_t attr_handle
|
||||||
|
|
||||||
// Ignore notifications with empty message
|
// Ignore notifications with empty message
|
||||||
const auto packetLen = OS_MBUF_PKTLEN(ctxt->om);
|
const auto packetLen = OS_MBUF_PKTLEN(ctxt->om);
|
||||||
if (packetLen <= headerSize)
|
if (packetLen <= headerSize) {
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
size_t bufferSize = std::min(packetLen + stringTerminatorSize, maxBufferSize);
|
size_t bufferSize = std::min(packetLen + stringTerminatorSize, maxBufferSize);
|
||||||
auto messageSize = std::min(maxMessageSize, (bufferSize - headerSize));
|
auto messageSize = std::min(maxMessageSize, (bufferSize - headerSize));
|
||||||
|
|
Loading…
Reference in a new issue