Initialize all member variables in constructors. (#1074)

This commit is contained in:
Jonathan Hui
2016-12-14 15:39:30 -08:00
committed by GitHub
parent 1a220e30d8
commit 5554a3fcb9
5 changed files with 29 additions and 5 deletions
+4
View File
@@ -144,6 +144,10 @@ Interpreter::Interpreter(otInstance *aInstance):
mInstance->mIp6.mIcmp.SetEchoReplyHandler(&s_HandleEchoResponse, this);
otSetStateChangedCallback(mInstance, &Interpreter::s_HandleNetifStateChanged, this);
otSetReceiveDiagnosticGetCallback(mInstance, &Interpreter::s_HandleDiagnosticGetResponse, this);
#if OPENTHREAD_ENABLE_DHCP6_CLIENT
memset(mDhcpAddresses, 0, sizeof(mDhcpAddresses));
#endif // OPENTHREAD_ENABLE_DHCP6_CLIENT
}
int Interpreter::Hex2Bin(const char *aHex, uint8_t *aBin, uint16_t aBinLength)