Skip to content

Commit 860d573

Browse files
committed
CNetIf: fix limited variable range warning
1 parent 816e2cf commit 860d573

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/lwIpWrapper/src/CNetIf.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ CNetIf* CLwipIf::get(NetIfType_t type,
228228
bool isStation = true;
229229
bool isEth = false;
230230

231-
if (type >= 0 && type < NETWORK_INTERFACES_MAX_NUM) {
231+
if (type == NI_WIFI_STATION || type == NI_WIFI_SOFTAP || type == NI_ETHERNET) {
232232
if (net_ifs[type] == nullptr) {
233233
switch (type) {
234234
case NI_WIFI_STATION:

0 commit comments

Comments
 (0)