diff --git a/src/core/thread/mle.hpp b/src/core/thread/mle.hpp index 34ad46d7e..32643c8d5 100644 --- a/src/core/thread/mle.hpp +++ b/src/core/thread/mle.hpp @@ -367,7 +367,12 @@ public: * Default constructor for the object. * */ - DelayedResponseHeader(void) { memset(this, 0, sizeof(*this)); } + DelayedResponseHeader(void) + : mDestination() + , mSendTime(0) + { + mDestination.Clear(); + } /** * This constructor initializes the object with specific values. @@ -377,9 +382,9 @@ public: * */ DelayedResponseHeader(TimeMilli aSendTime, const Ip6::Address &aDestination) + : mDestination(aDestination) + , mSendTime(aSendTime) { - mSendTime = aSendTime; - mDestination = aDestination; } /**