mirror of
https://github.com/espressif/openthread.git
synced 2026-08-02 09:07:47 +00:00
[mle] remove memset from DelayedResponseHeader constructors (#4195)
This commit is contained in:
committed by
Jonathan Hui
parent
26743fae04
commit
c1d123d177
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user