Browse Source

allow parameter "recved" can be null in function "rt_event_recv"

pathletboy 9 years ago
parent
commit
5b03e37ae1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/ipc.c

+ 2 - 1
src/ipc.c

@@ -1139,7 +1139,8 @@ rt_err_t rt_event_recv(rt_event_t   event,
     if (status == RT_EOK)
     if (status == RT_EOK)
     {
     {
         /* set received event */
         /* set received event */
-        *recved = (event->set & set);
+        if (recved)
+        	*recved = (event->set & set);
 
 
         /* received event */
         /* received event */
         if (option & RT_EVENT_FLAG_CLEAR)
         if (option & RT_EVENT_FLAG_CLEAR)