From d1da9ec5d385b3e20a6e8bf86254253ed0be4f42 Mon Sep 17 00:00:00 2001 From: Jonas Rabenstein Date: Wed, 3 Oct 2018 09:24:13 +0200 Subject: [PATCH] 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++. --- src/include/lwip/err.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/include/lwip/err.h b/src/include/lwip/err.h index 77730987..887d9b3f 100644 --- a/src/include/lwip/err.h +++ b/src/include/lwip/err.h @@ -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*/ + /** * @} */