Skip to content

Commit 982498d

Browse files
restyled-commitsmihai-ignat
authored andcommitted
Restyled by clang-format
1 parent 07b6230 commit 982498d

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

src/lib/shell/commands/WiFi.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static CHIP_ERROR WiFiConnectHandler(int argc, char ** argv)
119119
/* Command accepts running with SSID and password as parameters */
120120
VerifyOrReturnError((argc == 2), CHIP_ERROR_INVALID_ARGUMENT);
121121

122-
ByteSpan ssidSpan = ByteSpan(Uint8::from_const_char(argv[0]), strlen(argv[0]));
122+
ByteSpan ssidSpan = ByteSpan(Uint8::from_const_char(argv[0]), strlen(argv[0]));
123123
ByteSpan passwordSpan = ByteSpan(Uint8::from_const_char(argv[1]), strlen(argv[1]));
124124

125125
VerifyOrReturnError(IsSpanUsable(ssidSpan) && IsSpanUsable(passwordSpan), CHIP_ERROR_INVALID_ARGUMENT);

src/platform/nxp/common/ConnectivityManagerImpl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ void ConnectivityManagerImpl::ConnectNetworkTimerHandler(::chip::System::Layer *
595595
*/
596596
CHIP_ERROR ConnectivityManagerImpl::_DisconnectNetwork(void)
597597
{
598-
int ret = 0;
598+
int ret = 0;
599599
CHIP_ERROR err = CHIP_NO_ERROR;
600600

601601
if (ConnectivityMgrImpl().IsWiFiStationConnected())

src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp

+22-22
Original file line numberDiff line numberDiff line change
@@ -148,31 +148,31 @@ Status NXPWiFiDriver::RemoveNetwork(ByteSpan networkId, MutableCharSpan & outDeb
148148
outNetworkIndex = 0;
149149
VerifyOrReturnError(NetworkMatch(mStagingNetwork, networkId), Status::kNetworkIDNotFound);
150150

151-
err_code = wlan_remove_network((char *)networkId.data());
151+
err_code = wlan_remove_network((char *) networkId.data());
152152

153153
switch (err_code)
154154
{
155-
case -WM_E_INVAL:
156-
ChipLogError(DeviceLayer, "Error: Network not found");
157-
break;
158-
159-
case WM_SUCCESS:
160-
/* Use empty ssid for representing invalid network */
161-
mStagingNetwork.ssidLen = 0;
162-
memset(mStagingNetwork.ssid, 0, DeviceLayer::Internal::kMaxWiFiSSIDLength);
163-
memset(mStagingNetwork.credentials, 0, DeviceLayer::Internal::kMaxWiFiKeyLength);
164-
/* Save to persistent memory */
165-
CommitConfiguration();
166-
ChipLogProgress(DeviceLayer, "Successfully removed network");
167-
break;
168-
169-
case WLAN_ERROR_STATE:
170-
ChipLogError(DeviceLayer, "Error: Can't remove network in this state");
171-
break;
172-
173-
default:
174-
ChipLogError(DeviceLayer, "Error: Unable to remove network");
175-
break;
155+
case -WM_E_INVAL:
156+
ChipLogError(DeviceLayer, "Error: Network not found");
157+
break;
158+
159+
case WM_SUCCESS:
160+
/* Use empty ssid for representing invalid network */
161+
mStagingNetwork.ssidLen = 0;
162+
memset(mStagingNetwork.ssid, 0, DeviceLayer::Internal::kMaxWiFiSSIDLength);
163+
memset(mStagingNetwork.credentials, 0, DeviceLayer::Internal::kMaxWiFiKeyLength);
164+
/* Save to persistent memory */
165+
CommitConfiguration();
166+
ChipLogProgress(DeviceLayer, "Successfully removed network");
167+
break;
168+
169+
case WLAN_ERROR_STATE:
170+
ChipLogError(DeviceLayer, "Error: Can't remove network in this state");
171+
break;
172+
173+
default:
174+
ChipLogError(DeviceLayer, "Error: Unable to remove network");
175+
break;
176176
}
177177

178178
return Status::kSuccess;

0 commit comments

Comments
 (0)