mirror of
https://github.com/espressif/openthread.git
synced 2026-08-08 19:57:46 +00:00
Make VerifyOrExit() action argument optional. (#1554)
This commit is contained in:
+3
-3
@@ -1454,7 +1454,7 @@ void Interpreter::HandleIcmpReceive(Message &aMessage, const Ip6::MessageInfo &a
|
||||
{
|
||||
uint32_t timestamp = 0;
|
||||
|
||||
VerifyOrExit(aIcmpHeader.GetType() == kIcmp6TypeEchoReply, ;);
|
||||
VerifyOrExit(aIcmpHeader.GetType() == kIcmp6TypeEchoReply);
|
||||
|
||||
sServer->OutputFormat("%d bytes from ", aMessage.GetLength() - aMessage.GetOffset());
|
||||
sServer->OutputFormat("%x:%x:%x:%x:%x:%x:%x:%x",
|
||||
@@ -2841,7 +2841,7 @@ void Interpreter::ProcessLine(char *aBuf, uint16_t aBufLength, Server &aServer)
|
||||
|
||||
sServer = &aServer;
|
||||
|
||||
VerifyOrExit(aBuf != NULL, ;);
|
||||
VerifyOrExit(aBuf != NULL);
|
||||
|
||||
for (; *aBuf == ' '; aBuf++, aBufLength--);
|
||||
|
||||
@@ -2903,7 +2903,7 @@ void Interpreter::HandleNetifStateChanged(otInstance *aInstance, uint32_t aFlags
|
||||
void Interpreter::HandleNetifStateChanged(uint32_t aFlags)
|
||||
#endif
|
||||
{
|
||||
VerifyOrExit((aFlags & OT_THREAD_NETDATA_UPDATED) != 0, ;);
|
||||
VerifyOrExit((aFlags & OT_THREAD_NETDATA_UPDATED) != 0);
|
||||
|
||||
#ifndef OTDLL
|
||||
otIp6SlaacUpdate(mInstance, mSlaacAddresses, sizeof(mSlaacAddresses) / sizeof(mSlaacAddresses[0]),
|
||||
|
||||
@@ -294,7 +294,7 @@ ThreadError Dataset::ProcessCommit(otInstance *aInstance, int argc, char *argv[]
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
|
||||
VerifyOrExit(argc > 0, ;);
|
||||
VerifyOrExit(argc > 0);
|
||||
|
||||
if (strcmp(argv[0], "active") == 0)
|
||||
{
|
||||
|
||||
@@ -197,7 +197,7 @@ int Uart::OutputFormatV(const char *aFmt, va_list aAp)
|
||||
|
||||
void Uart::Send(void)
|
||||
{
|
||||
VerifyOrExit(mSendLength == 0, ;);
|
||||
VerifyOrExit(mSendLength == 0);
|
||||
|
||||
if (mTxLength > kTxBufferSize - mTxHead)
|
||||
{
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ void Udp::HandleUdpReceive(otMessage *aMessage, const otMessageInfo *aMessageInf
|
||||
uint16_t payloadLength = otMessageGetLength(aMessage) - otMessageGetOffset(aMessage);
|
||||
char buf[512];
|
||||
|
||||
VerifyOrExit(payloadLength <= sizeof(buf), ;);
|
||||
VerifyOrExit(payloadLength <= sizeof(buf));
|
||||
otMessageRead(aMessage, otMessageGetOffset(aMessage), buf, payloadLength);
|
||||
|
||||
if (buf[payloadLength - 1] == '\n')
|
||||
|
||||
Reference in New Issue
Block a user