[cli] adjust arg length checking to 'coap parameters' (#4595)

This commit is contained in:
Jonathan Hui
2020-02-25 06:39:02 -08:00
committed by GitHub
parent 9a4098fdb5
commit fe6a7e1493
+3 -4
View File
@@ -143,13 +143,12 @@ otError Coap::ProcessStop(int argc, char *argv[])
otError Coap::ProcessParameters(int argc, char *argv[])
{
otError error = OT_ERROR_NONE;
VerifyOrExit(argc > 0, error = OT_ERROR_INVALID_ARGS);
otError error = OT_ERROR_NONE;
bool * defaultTxParameters;
otCoapTxParameters *txParameters;
VerifyOrExit(argc > 1, error = OT_ERROR_INVALID_ARGS);
if (strcmp(argv[1], "request") == 0)
{
txParameters = &mRequestTxParameters;