From 5b03e37ae1e91ab9b7f8f3edce807590f72648ac Mon Sep 17 00:00:00 2001 From: pathletboy Date: Sat, 21 Nov 2015 20:55:41 +0800 Subject: [PATCH 1/3] allow parameter "recved" can be null in function "rt_event_recv" --- src/ipc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ipc.c b/src/ipc.c index 0ad50bfbc5..fee4829850 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -1139,7 +1139,8 @@ rt_err_t rt_event_recv(rt_event_t event, if (status == RT_EOK) { /* set received event */ - *recved = (event->set & set); + if (recved) + *recved = (event->set & set); /* received event */ if (option & RT_EVENT_FLAG_CLEAR) From 30cbe3cc3e3f54f75e20b23bbf98c59e24c3bc96 Mon Sep 17 00:00:00 2001 From: pathletboy Date: Sun, 22 Nov 2015 15:55:19 +0800 Subject: [PATCH 2/3] add document. --- src/ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipc.c b/src/ipc.c index fee4829850..e545417f18 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -1086,7 +1086,7 @@ RTM_EXPORT(rt_event_send); * @param option the receive option, either RT_EVENT_FLAG_AND or * RT_EVENT_FLAG_OR should be set. * @param timeout the waiting time - * @param recved the received event + * @param recved the received event, if you don't care, RT_NULL can be set. * * @return the error code */ From 78c9ddef86c67664ad1987c3899eae4e20879aba Mon Sep 17 00:00:00 2001 From: pathletboy Date: Mon, 23 Nov 2015 13:23:55 +0800 Subject: [PATCH 3/3] fix code indent. --- src/ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipc.c b/src/ipc.c index e545417f18..7f8f0668e5 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -1140,7 +1140,7 @@ rt_err_t rt_event_recv(rt_event_t event, { /* set received event */ if (recved) - *recved = (event->set & set); + *recved = (event->set & set); /* received event */ if (option & RT_EVENT_FLAG_CLEAR)