Skip to content

Commit a7c21df

Browse files
ci(pre-commit): Apply automatic fixes
1 parent f5b599e commit a7c21df

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Diff for: libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ void setup() {
3939

4040
// by default DNSServer is started serving any "*" domain name. It will reply
4141
// AccessPoint's IP to all DNS request (this is required for Captive Portal detection)
42-
if ( dnsServer.start() )
42+
if (dnsServer.start()) {
4343
Serial.println("Started DNS server in captive portal-mode");
44-
else
44+
} else {
4545
Serial.println("Err: Can't start DNS server!");
46+
}
4647

4748
// serve a simple root page
4849
server.on("/", handleRoot);

Diff for: libraries/DNSServer/src/DNSServer.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ bool DNSServer::start() {
2222
#if SOC_WIFI_SUPPORTED
2323
if (WiFi.getMode() & WIFI_AP) {
2424
_resolvedIP = WiFi.softAPIP();
25-
} else
26-
return false; // won't run if WiFi is not in AP mode, or no WiFi
25+
} else {
26+
return false; // won't run if WiFi is not in AP mode, or no WiFi
27+
}
2728
#else
28-
return false; // for other non WiFi-AP networking an overloaded method must be used to get device's IP
29-
// start(uint16_t port, const String &domainName, const IPAddress &resolvedIP)
29+
return false; // for other non WiFi-AP networking an overloaded method must be used to get device's IP
30+
// start(uint16_t port, const String &domainName, const IPAddress &resolvedIP)
3031
#endif
3132
}
3233

0 commit comments

Comments
 (0)