mirror of
https://github.com/espressif/openthread.git
synced 2026-07-09 05:40:27 +00:00
Make VerifyOrExit() action argument optional. (#1554)
This commit is contained in:
@@ -112,12 +112,12 @@ otInstance *otInstanceInit(void *aInstanceBuffer, size_t *aInstanceBufferSize)
|
||||
|
||||
otLogFuncEntry();
|
||||
|
||||
VerifyOrExit(aInstanceBufferSize != NULL, ;);
|
||||
VerifyOrExit(aInstanceBufferSize != NULL);
|
||||
|
||||
// Make sure the input buffer is big enough
|
||||
VerifyOrExit(sizeof(otInstance) <= *aInstanceBufferSize, *aInstanceBufferSize = sizeof(otInstance));
|
||||
|
||||
VerifyOrExit(aInstanceBuffer != NULL, ;);
|
||||
VerifyOrExit(aInstanceBuffer != NULL);
|
||||
|
||||
// Construct the context
|
||||
aInstance = new(aInstanceBuffer)otInstance();
|
||||
@@ -139,7 +139,7 @@ otInstance *otInstanceInit()
|
||||
{
|
||||
otLogFuncEntry();
|
||||
|
||||
VerifyOrExit(sInstance == NULL, ;);
|
||||
VerifyOrExit(sInstance == NULL);
|
||||
|
||||
// Construct the context
|
||||
sInstance = new(&sInstanceRaw)otInstance();
|
||||
|
||||
Reference in New Issue
Block a user