Skip to content

Commit 863c482

Browse files
committed
Code cleanup as per review feedback.
1 parent 62af940 commit 863c482

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

libraries/ESP8266WiFi/src/ESP8266WiFiMulti.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ static wl_status_t waitWiFiConnect(uint32_t connectTimeoutMs)
8787
// The final argument, intvl_ms, to esp_delay influences how frequently
8888
// the scheduled recurrent functions (Schedule.h) are probed.
8989
esp_delay(connectTimeoutMs,
90-
[&status]() { status = WiFi.status(); return status != WL_CONNECTED && status != WL_CONNECT_FAILED; }, 0);
90+
[&status]() {
91+
status = WiFi.status();
92+
return status != WL_CONNECTED && status != WL_CONNECT_FAILED;
93+
}, 0);
9194

9295
// Check status
9396
if (status == WL_CONNECTED) {
@@ -236,7 +239,10 @@ int8_t ESP8266WiFiMulti::startScan()
236239
// The final argument, intvl_ms, to esp_delay influences how frequently
237240
// the scheduled recurrent functions (Schedule.h) are probed.
238241
esp_delay(WIFI_SCAN_TIMEOUT_MS,
239-
[&scanResult]() { scanResult = WiFi.scanComplete(); return scanResult < 0; }, 0);
242+
[&scanResult]() {
243+
scanResult = WiFi.scanComplete();
244+
return scanResult < 0;
245+
}, 0);
240246
// Check for scan timeout which may occur when scan does not report completion
241247
if (scanResult < 0) {
242248
DEBUG_WIFI_MULTI("[WIFIM] Scan timeout\n");

0 commit comments

Comments
 (0)