mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 23:29:25 +00:00
netif_find: correctly check if atoi means '0' or error
Fixes: 4528215c99
("netif_find: check if atoi means '0' or error")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
f857260e29
commit
555812dcec
@ -1744,7 +1744,7 @@ netif_find(const char *name)
|
||||
}
|
||||
|
||||
num = (u8_t)atoi(&name[2]);
|
||||
if (!num && (name[2] != 0)) {
|
||||
if (!num && (name[2] != '0')) {
|
||||
/* this means atoi has failed */
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user