Clean up error names. (#1764)

This commit is contained in:
Jonathan Hui
2017-05-23 09:34:35 -07:00
committed by GitHub
parent b3530deb76
commit 48b9299544
262 changed files with 6230 additions and 6204 deletions
+10 -10
View File
@@ -85,10 +85,10 @@ void otInstancePostConstructor(otInstance *aInstance)
// If auto start is configured, do that now
if (otThreadGetAutoStart(aInstance))
{
if (otIp6SetEnabled(aInstance, true) == kThreadError_None)
if (otIp6SetEnabled(aInstance, true) == OT_ERROR_NONE)
{
// Only try to start Thread if we could bring up the interface
if (otThreadSetEnabled(aInstance, true) != kThreadError_None)
if (otThreadSetEnabled(aInstance, true) != OT_ERROR_NONE)
{
// Bring the interface down if Thread failed to start
otIp6SetEnabled(aInstance, false);
@@ -166,9 +166,9 @@ void otInstanceFinalize(otInstance *aInstance)
otLogFuncExit();
}
ThreadError otSetStateChangedCallback(otInstance *aInstance, otStateChangedCallback aCallback, void *aCallbackContext)
otError otSetStateChangedCallback(otInstance *aInstance, otStateChangedCallback aCallback, void *aCallbackContext)
{
ThreadError error = kThreadError_NoBufs;
otError error = OT_ERROR_NO_BUFS;
for (size_t i = 0; i < OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS; i++)
{
@@ -207,11 +207,11 @@ void otInstanceFactoryReset(otInstance *aInstance)
otPlatReset(aInstance);
}
ThreadError otInstanceErasePersistentInfo(otInstance *aInstance)
otError otInstanceErasePersistentInfo(otInstance *aInstance)
{
ThreadError error = kThreadError_None;
otError error = OT_ERROR_NONE;
VerifyOrExit(otThreadGetDeviceRole(aInstance) == kDeviceRoleDisabled, error = kThreadError_InvalidState);
VerifyOrExit(otThreadGetDeviceRole(aInstance) == kDeviceRoleDisabled, error = OT_ERROR_INVALID_STATE);
otPlatSettingsWipe(aInstance);
exit:
@@ -232,14 +232,14 @@ otLogLevel otGetDynamicLogLevel(otInstance *aInstance)
return logLevel;
}
ThreadError otSetDynamicLogLevel(otInstance *aInstance, otLogLevel aLogLevel)
otError otSetDynamicLogLevel(otInstance *aInstance, otLogLevel aLogLevel)
{
ThreadError error = kThreadError_None;
otError error = OT_ERROR_NONE;
#if OPENTHREAD_CONFIG_ENABLE_DYNAMIC_LOG_LEVEL
aInstance->mLogLevel = aLogLevel;
#else
error = kThreadError_NotCapable;
error = OT_ERROR_NOT_CAPABLE;
(void)aInstance;
(void)aLogLevel;
#endif