mirror of
https://github.com/esphome/esphome.git
synced 2025-11-17 23:35:47 +00:00
preen
This commit is contained in:
@@ -386,10 +386,8 @@ WiFiAP WiFiComponent::build_selected_ap_() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WiFiAP WiFiComponent::get_sta() {
|
WiFiAP WiFiComponent::get_sta() {
|
||||||
if (const WiFiAP *config = this->get_selected_sta_()) {
|
const WiFiAP *config = this->get_selected_sta_();
|
||||||
return *config;
|
return config ? *config : WiFiAP{};
|
||||||
}
|
|
||||||
return WiFiAP{};
|
|
||||||
}
|
}
|
||||||
void WiFiComponent::save_wifi_sta(const std::string &ssid, const std::string &password) {
|
void WiFiComponent::save_wifi_sta(const std::string &ssid, const std::string &password) {
|
||||||
SavedWifiSettings save{}; // zero-initialized - all bytes set to \0, guaranteeing null termination
|
SavedWifiSettings save{}; // zero-initialized - all bytes set to \0, guaranteeing null termination
|
||||||
|
|||||||
Reference in New Issue
Block a user