Skip to content

Commit b9163e5

Browse files
committed
WiFi: remove usless variable in scanNetwork
1 parent 411af08 commit b9163e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/WiFi/src/WiFi.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,13 @@ int arduino::WiFiClass::setSSID(const char* ssid) {
213213

214214
int8_t arduino::WiFiClass::scanNetworks() {
215215
connected_ap = SSID_MAX_COUNT;
216-
uint8_t count = SSID_MAX_COUNT;
217216
if (ap_list != nullptr) {
218217
delete[]ap_list;
219218
ap_list = nullptr;
220219
}
221-
ap_list = new WiFiAccessPoint[count];
222-
return wifi_if->scan(ap_list, count);
220+
221+
ap_list = new WiFiAccessPoint[SSID_MAX_COUNT];
222+
return wifi_if->scan(ap_list, SSID_MAX_COUNT);
223223
}
224224

225225
char* arduino::WiFiClass::SSID(uint8_t networkItem) {

0 commit comments

Comments
 (0)