Initialize all member variables in constructors. (#1026)

This commit is contained in:
Jonathan Hui
2016-12-01 08:51:55 -08:00
committed by GitHub
parent 353c3afbdd
commit 9586cfb700
8 changed files with 66 additions and 42 deletions
+2
View File
@@ -133,12 +133,14 @@ const struct Command Interpreter::sCommands[] =
};
Interpreter::Interpreter(otInstance *aInstance):
sServer(NULL),
sLength(8),
sCount(1),
sInterval(1000),
sPingTimer(aInstance->mIp6.mTimerScheduler, &Interpreter::s_HandlePingTimer, this),
mInstance(aInstance)
{
memset(mSlaacAddresses, 0, sizeof(mSlaacAddresses));
mInstance->mIp6.mIcmp.SetEchoReplyHandler(&s_HandleEchoResponse, this);
otSetStateChangedCallback(mInstance, &Interpreter::s_HandleNetifStateChanged, this);
}