mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-02 14:58:22 +00:00
sockets ERR_TO_ERRNO_TABLE_SIZE: use LWIP_ARRAYSIZE()
This commit is contained in:
parent
424bd7e38c
commit
5b1b430403
@ -305,8 +305,7 @@ static const int err_to_errno_table[] = {
|
||||
-1, /* ERR_IF -16 Low-level netif error */
|
||||
};
|
||||
|
||||
#define ERR_TO_ERRNO_TABLE_SIZE \
|
||||
(sizeof(err_to_errno_table)/sizeof(err_to_errno_table[0]))
|
||||
#define ERR_TO_ERRNO_TABLE_SIZE LWIP_ARRAYSIZE(err_to_errno_table)
|
||||
|
||||
#define err_to_errno(err) \
|
||||
((unsigned)(-(err)) < ERR_TO_ERRNO_TABLE_SIZE ? \
|
||||
|
Loading…
Reference in New Issue
Block a user