mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Fix incorrect comparison in get_socket().
Spotted by Frederic Bernon.
This commit is contained in:
parent
1d22294974
commit
75beb3bd35
@ -118,7 +118,7 @@ get_socket(int s)
|
|||||||
{
|
{
|
||||||
struct lwip_socket *sock;
|
struct lwip_socket *sock;
|
||||||
|
|
||||||
if ((s < 0) || (s > NUM_SOCKETS)) {
|
if ((s < 0) || (s >= NUM_SOCKETS)) {
|
||||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("get_socket(%d): invalid\n", s));
|
LWIP_DEBUGF(SOCKETS_DEBUG, ("get_socket(%d): invalid\n", s));
|
||||||
set_errno(EBADF);
|
set_errno(EBADF);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user