Skip to content

Commit

Permalink
if -> switch from review comment (#13038)
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille authored and pull[bot] committed Nov 29, 2023
1 parent 8dce6e3 commit 6040414
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions examples/chip-tool/commands/pairing/PairingCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,17 @@ CHIP_ERROR PairingCommand::RunInternal(NodeId remoteId)

CommissioningParameters PairingCommand::GetCommissioningParameters()
{
CommissioningParameters commissioningParams;
if (mNetworkType == PairingNetworkType::WiFi)
switch (mNetworkType)
{
commissioningParams.SetWifiCredentials(Controller::WifiCredentials(mSSID, mPassword));
case PairingNetworkType::WiFi:
return CommissioningParameters().SetWifiCredentials(Controller::WifiCredentials(mSSID, mPassword));
case PairingNetworkType::Thread:
return CommissioningParameters().SetThreadOperationalDataset(mOperationalDataset);
case PairingNetworkType::Ethernet:
case PairingNetworkType::None:
return CommissioningParameters();
}
else if (mNetworkType == PairingNetworkType::Thread)
{
commissioningParams.SetThreadOperationalDataset(mOperationalDataset);
}
return commissioningParams;
return CommissioningParameters();
}

CHIP_ERROR PairingCommand::PairWithQRCode(NodeId remoteId)
Expand Down

0 comments on commit 6040414

Please sign in to comment.