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:
Axel Lin 2016-03-10 07:21:34 +01:00 committed by goldsimon
parent f3b7bca3cf
commit 2a2f92f7c2

View File

@ -60,18 +60,15 @@ typedef s8_t err_t;
#define ERR_USE -8 /* Address in use. */
#define ERR_ALREADY -9 /* Already connecting. */
#define ERR_ISCONN -10 /* Conn already established.*/
#define ERR_CONN -11 /* Not connected. */
#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_RST -14 /* Connection reset. */
#define ERR_CLSD -15 /* Connection closed. */
#define ERR_ARG -16 /* Illegal argument. */
#ifdef LWIP_DEBUG
extern const char *lwip_strerr(err_t err);
#else