Make VerifyOrExit() action argument optional. (#1554)

This commit is contained in:
Jonathan Hui
2017-04-05 09:44:22 -07:00
committed by GitHub
parent 02bd8e1ddd
commit 49ac7fbc2c
55 changed files with 366 additions and 332 deletions
+3 -3
View File
@@ -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();