Skip to content

Commit

Permalink
Add return to prevent indent in the following code
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca committed Nov 4, 2022
1 parent a5d3c57 commit fbd87ea
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions src/platform/Linux/ConnectivityManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1060,25 +1060,24 @@ void ConnectivityManagerImpl::_ConnectWiFiNetworkAsyncCallback(GObject * source_
}
mpConnectCallback = nullptr;
});

return;
}
else
{
GError * gerror = nullptr;

result = wpa_fi_w1_wpa_supplicant1_interface_call_save_config_sync(mWpaSupplicant.iface, nullptr, &gerror);
if (result)
{
ChipLogProgress(DeviceLayer, "wpa_supplicant: save config succeeded!");
}
else
{
ChipLogProgress(DeviceLayer, "wpa_supplicant: failed to save config: %s",
gerror ? gerror->message : "unknown error");
}
GError * gerror = nullptr;

if (gerror != nullptr)
g_error_free(gerror);
result = wpa_fi_w1_wpa_supplicant1_interface_call_save_config_sync(mWpaSupplicant.iface, nullptr, &gerror);
if (result)
{
ChipLogProgress(DeviceLayer, "wpa_supplicant: save config succeeded!");
}
else
{
ChipLogProgress(DeviceLayer, "wpa_supplicant: failed to save config: %s", gerror ? gerror->message : "unknown error");
}

if (gerror != nullptr)
g_error_free(gerror);
}
}

Expand Down

0 comments on commit fbd87ea

Please sign in to comment.