From 9e89fa158d5e68ca445adeee75a0d5e0cc8ed973 Mon Sep 17 00:00:00 2001 From: wangqiang Date: Wed, 12 Jan 2022 17:51:40 +0800 Subject: [PATCH] fixed the return value for sys_arch_mbox_fetch in lwip stack --- components/net/lwip-1.4.1/src/arch/sys_arch.c | 2 +- components/net/lwip-2.0.2/src/arch/sys_arch.c | 2 +- components/net/lwip-2.0.3/src/arch/sys_arch.c | 2 +- components/net/lwip-2.1.2/src/arch/sys_arch.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/net/lwip-1.4.1/src/arch/sys_arch.c b/components/net/lwip-1.4.1/src/arch/sys_arch.c index 793568d836..09de3f3ecc 100644 --- a/components/net/lwip-1.4.1/src/arch/sys_arch.c +++ b/components/net/lwip-1.4.1/src/arch/sys_arch.c @@ -534,7 +534,7 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg) else { if (ret == RT_EOK) - ret = 1; + ret = 0; } return ret; diff --git a/components/net/lwip-2.0.2/src/arch/sys_arch.c b/components/net/lwip-2.0.2/src/arch/sys_arch.c index 3de85b338c..6556fd0c9f 100644 --- a/components/net/lwip-2.0.2/src/arch/sys_arch.c +++ b/components/net/lwip-2.0.2/src/arch/sys_arch.c @@ -544,7 +544,7 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg) else { if (ret == RT_EOK) - ret = 1; + ret = 0; } return ret; diff --git a/components/net/lwip-2.0.3/src/arch/sys_arch.c b/components/net/lwip-2.0.3/src/arch/sys_arch.c index 3de85b338c..6556fd0c9f 100644 --- a/components/net/lwip-2.0.3/src/arch/sys_arch.c +++ b/components/net/lwip-2.0.3/src/arch/sys_arch.c @@ -544,7 +544,7 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg) else { if (ret == RT_EOK) - ret = 1; + ret = 0; } return ret; diff --git a/components/net/lwip-2.1.2/src/arch/sys_arch.c b/components/net/lwip-2.1.2/src/arch/sys_arch.c index a7d3f98968..c89ab737c9 100644 --- a/components/net/lwip-2.1.2/src/arch/sys_arch.c +++ b/components/net/lwip-2.1.2/src/arch/sys_arch.c @@ -558,7 +558,7 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg) else { if (ret == RT_EOK) - ret = 1; + ret = 0; } return ret;