sockets ERR_TO_ERRNO_TABLE_SIZE: use LWIP_ARRAYSIZE()

This commit is contained in:
goldsimon 2015-10-02 10:07:45 +02:00
parent 424bd7e38c
commit 5b1b430403

View File

@ -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 ? \