Skip to content

Commit

Permalink
[ncp] use SendCommand with no va_args requirement to avoid compil…
Browse files Browse the repository at this point in the history
…ation issues (#2443)

Avoids an issue in `ncp_spinel.cpp` related to a dummy va_list variable being uninitialized.
  • Loading branch information
suveshpratapa authored Aug 22, 2024
1 parent 1f6390e commit 3d663e1
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 3d663e1

Please sign in to comment.