aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-09-11 14:55:20 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-09-11 14:55:20 -0700
commitf033865e64890f98f89da3af1042a2e76cf42263 (patch)
tree1e8bc0295789e6ff73ce78b81998c6a16d325079
parent8ab3e6c4236a40674325a13cc9f5dceaee3400d3 (diff)
downloadlwip-f033865e64890f98f89da3af1042a2e76cf42263.tar.gz
lwip-f033865e64890f98f89da3af1042a2e76cf42263.tar.xz
lwip-f033865e64890f98f89da3af1042a2e76cf42263.zip
lwip: sys_arch.c: properly handle sys_mbox_trypost
Handle the return values for sys_mbox_trypost correctly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/lwip/src/arch/sys_arch.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/lwip/src/arch/sys_arch.c b/core/lwip/src/arch/sys_arch.c
index bd71052e..e695dc06 100644
--- a/core/lwip/src/arch/sys_arch.c
+++ b/core/lwip/src/arch/sys_arch.c
@@ -58,7 +58,7 @@ void sys_mbox_post(sys_mbox_t mbox, void *msg)
err_t sys_mbox_trypost(sys_mbox_t mbox, void *msg)
{
- return mbox_post(mbox, msg, -1);
+ return mbox_post(mbox, msg, -1) ? ERR_MEM : ERR_OK;
}
u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout)
@@ -76,5 +76,3 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t mbox, void **msg)
{
return mbox_fetch(mbox, msg, -1);
}
-
-