From 00975769a084eecc8d3c76b46640bbc41665132b Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 8 Mar 2016 21:56:32 +0100 Subject: [PATCH] Minor TCPIP API call functions cleanup --- src/api/tcpip.c | 6 +++--- src/include/lwip/priv/tcpip_priv.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/tcpip.c b/src/api/tcpip.c index 54ccf9ac..54c7f77f 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -339,12 +339,12 @@ tcpip_send_api_msg(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem) err_t tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call *call) { #if LWIP_TCPIP_CORE_LOCKING + err_t err; LOCK_TCPIP_CORE(); - call->err = fn(call); + err = fn(call); UNLOCK_TCPIP_CORE(); - return call->err; + return err; #else - if (sys_mbox_valid_val(mbox)) { TCPIP_MSG_VAR_DECLARE(msg); err_t err; diff --git a/src/include/lwip/priv/tcpip_priv.h b/src/include/lwip/priv/tcpip_priv.h index c7c94fd1..5b2b924a 100644 --- a/src/include/lwip/priv/tcpip_priv.h +++ b/src/include/lwip/priv/tcpip_priv.h @@ -106,8 +106,8 @@ struct tcpip_api_call tcpip_api_call_fn function; #if !LWIP_TCPIP_CORE_LOCKING sys_sem_t sem; -#endif /* !LWIP_TCPIP_CORE_LOCKING */ err_t err; +#endif /* !LWIP_TCPIP_CORE_LOCKING */ }; err_t tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call *call);