Skip to content

Commit b328c1c

Browse files
author
chenchaoqun
committed
[modify] if ... else if constructs to be terminated with an else clause, which other option is invalid and delete surplus space.
1 parent e6b7215 commit b328c1c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/ipc.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,13 @@ rt_err_t rt_event_send(rt_event_t event, rt_uint32_t set)
10801080
status = RT_EOK;
10811081
}
10821082
}
1083+
else
1084+
{
1085+
/* enable interrupt */
1086+
rt_hw_interrupt_enable(level);
1087+
1088+
return -RT_EINVAL;
1089+
}
10831090

10841091
/* move node to the next */
10851092
n = n->next;
@@ -1186,10 +1193,10 @@ rt_err_t rt_event_recv(rt_event_t event,
11861193
{
11871194
/* no waiting */
11881195
thread->error = -RT_ETIMEOUT;
1189-
1196+
11901197
/* enable interrupt */
11911198
rt_hw_interrupt_enable(level);
1192-
1199+
11931200
return -RT_ETIMEOUT;
11941201
}
11951202
else

0 commit comments

Comments
 (0)