Skip to content

Commit

Permalink
[ncp] use newly added version of SendCommand with no va_args requirem…
Browse files Browse the repository at this point in the history
…ent to avoid compilation issues

Avoids an issue in `ncp_spinel.cpp` related to a dummy va_list variable being uninitialized.
  • Loading branch information
suveshpratapa committed Aug 21, 2024
1 parent 861ddf2 commit d91f437
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ncp/ncp_spinel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,10 @@ void NcpSpinel::ThreadErasePersistentInfo(AsyncTaskPtr aAsyncTask)
{
otError error = OT_ERROR_NONE;
spinel_tid_t tid = GetNextTid();
va_list args;

VerifyOrExit(mThreadErasePersistentInfoTask == nullptr, error = OT_ERROR_BUSY);

SuccessOrExit(error =
mSpinelDriver->SendCommand(SPINEL_CMD_NET_CLEAR, SPINEL_PROP_LAST_STATUS, tid, nullptr, args));
SuccessOrExit(error = mSpinelDriver->SendCommand(SPINEL_CMD_NET_CLEAR, SPINEL_PROP_LAST_STATUS, tid));

mWaitingKeyTable[tid] = SPINEL_PROP_LAST_STATUS;
mCmdTable[tid] = SPINEL_CMD_NET_CLEAR;
Expand Down

0 comments on commit d91f437

Please sign in to comment.