mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-30 22:10:28 +08:00
[modify] if ... else if constructs to be terminated with an else clause, which other option is invalid and delete surplus space.
This commit is contained in:
parent
e6b72153b4
commit
b328c1cbac
11
src/ipc.c
11
src/ipc.c
@ -1080,6 +1080,13 @@ rt_err_t rt_event_send(rt_event_t event, rt_uint32_t set)
|
|||||||
status = RT_EOK;
|
status = RT_EOK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* enable interrupt */
|
||||||
|
rt_hw_interrupt_enable(level);
|
||||||
|
|
||||||
|
return -RT_EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
/* move node to the next */
|
/* move node to the next */
|
||||||
n = n->next;
|
n = n->next;
|
||||||
@ -1186,10 +1193,10 @@ rt_err_t rt_event_recv(rt_event_t event,
|
|||||||
{
|
{
|
||||||
/* no waiting */
|
/* no waiting */
|
||||||
thread->error = -RT_ETIMEOUT;
|
thread->error = -RT_ETIMEOUT;
|
||||||
|
|
||||||
/* enable interrupt */
|
/* enable interrupt */
|
||||||
rt_hw_interrupt_enable(level);
|
rt_hw_interrupt_enable(level);
|
||||||
|
|
||||||
return -RT_ETIMEOUT;
|
return -RT_ETIMEOUT;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user