mirror of
https://github.com/espressif/openthread.git
synced 2026-07-30 23:57:47 +00:00
[cli] add missing initializer in coap/udp examples (#2395)
This commit is contained in:
@@ -43,6 +43,12 @@
|
||||
namespace ot {
|
||||
namespace Cli {
|
||||
|
||||
Coap::Coap(Interpreter &aInterpreter):
|
||||
mInterpreter(aInterpreter)
|
||||
{
|
||||
memset(&mResource, 0, sizeof(mResource));
|
||||
}
|
||||
|
||||
void Coap::PrintPayload(otMessage *aMessage) const
|
||||
{
|
||||
uint8_t buf[kMaxBufferSize];
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
* @param[in] aInterpreter The CLI interpreter.
|
||||
*
|
||||
*/
|
||||
Coap(Interpreter &aInterpreter): mInterpreter(aInterpreter) { }
|
||||
Coap(Interpreter &aInterpreter);
|
||||
|
||||
/**
|
||||
* This method interprets a list of CLI arguments.
|
||||
|
||||
@@ -54,6 +54,12 @@ const struct UdpExample::Command UdpExample::sCommands[] =
|
||||
{ "send", &UdpExample::ProcessSend }
|
||||
};
|
||||
|
||||
UdpExample::UdpExample(Interpreter &aInterpreter):
|
||||
mInterpreter(aInterpreter)
|
||||
{
|
||||
memset(&mSocket, 0, sizeof(mSocket));
|
||||
}
|
||||
|
||||
otError UdpExample::ProcessHelp(int argc, char *argv[])
|
||||
{
|
||||
for (unsigned int i = 0; i < sizeof(sCommands) / sizeof(sCommands[0]); i++)
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
* @param[in] aInterpreter The CLI interpreter.
|
||||
*
|
||||
*/
|
||||
UdpExample(Interpreter &aInterpreter): mInterpreter(aInterpreter) { }
|
||||
UdpExample(Interpreter &aInterpreter);
|
||||
|
||||
/**
|
||||
* This method interprets a list of CLI arguments.
|
||||
|
||||
Reference in New Issue
Block a user