mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-25 07:33:11 +00:00
Make ERR_IS_FATAL() test first fatal error instead of last non-fatal error
This way, we don't need to update ERR_IS_FATAL() every time new non-fatal error is added. Also drop 2 empty lines so the error constants present in 2 groups, non-fatal errors and fatal errors.
This commit is contained in:
parent
f3b7bca3cf
commit
2a2f92f7c2
@ -60,18 +60,15 @@ typedef s8_t err_t;
|
|||||||
#define ERR_USE -8 /* Address in use. */
|
#define ERR_USE -8 /* Address in use. */
|
||||||
#define ERR_ALREADY -9 /* Already connecting. */
|
#define ERR_ALREADY -9 /* Already connecting. */
|
||||||
#define ERR_ISCONN -10 /* Conn already established.*/
|
#define ERR_ISCONN -10 /* Conn already established.*/
|
||||||
|
|
||||||
#define ERR_CONN -11 /* Not connected. */
|
#define ERR_CONN -11 /* Not connected. */
|
||||||
#define ERR_IF -12 /* Low-level netif error */
|
#define ERR_IF -12 /* Low-level netif error */
|
||||||
#define ERR_IS_FATAL(e) ((e) < ERR_IF)
|
|
||||||
|
|
||||||
|
#define ERR_IS_FATAL(e) ((e) <= ERR_ABRT)
|
||||||
#define ERR_ABRT -13 /* Connection aborted. */
|
#define ERR_ABRT -13 /* Connection aborted. */
|
||||||
#define ERR_RST -14 /* Connection reset. */
|
#define ERR_RST -14 /* Connection reset. */
|
||||||
#define ERR_CLSD -15 /* Connection closed. */
|
#define ERR_CLSD -15 /* Connection closed. */
|
||||||
|
|
||||||
#define ERR_ARG -16 /* Illegal argument. */
|
#define ERR_ARG -16 /* Illegal argument. */
|
||||||
|
|
||||||
|
|
||||||
#ifdef LWIP_DEBUG
|
#ifdef LWIP_DEBUG
|
||||||
extern const char *lwip_strerr(err_t err);
|
extern const char *lwip_strerr(err_t err);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user