err.h: move typedef of err_t after enum definition

This allows for 'typedef err_enum_t err_t' and thus strong type checking
of the enum in c++.
This commit is contained in:
Jonas Rabenstein 2018-10-03 09:24:13 +02:00 committed by Dirk Ziegelmeier
parent 684adaca29
commit d1da9ec5d3

View File

@ -49,14 +49,6 @@ extern "C" {
* @{
*/
/** Define LWIP_ERR_T in cc.h if you want to use
* a different type for your platform (must be signed). */
#ifdef LWIP_ERR_T
typedef LWIP_ERR_T err_t;
#else /* LWIP_ERR_T */
typedef s8_t err_t;
#endif /* LWIP_ERR_T*/
/** Definitions for error constants. */
typedef enum {
/** No error, everything OK. */
@ -96,6 +88,14 @@ typedef enum {
ERR_ARG = -16
} err_enum_t;
/** Define LWIP_ERR_T in cc.h if you want to use
* a different type for your platform (must be signed). */
#ifdef LWIP_ERR_T
typedef LWIP_ERR_T err_t;
#else /* LWIP_ERR_T */
typedef s8_t err_t;
#endif /* LWIP_ERR_T*/
/**
* @}
*/