mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 10:32:47 +08:00
vfs/epoll: Fix one bug of EPOLL_CTL_DEL.
N/A Signed-off-by: 丁欣童 <dingxintong@xiaomi.com> Change-Id: I91ec9fbf4b3884cb29bf30c4ff69a6c5df7f30ca
This commit is contained in:
+1
-1
@@ -275,7 +275,7 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev)
|
||||
{
|
||||
if (eph->poll[i].fd == fd)
|
||||
{
|
||||
if (i != eph->occupied - 1)
|
||||
if (i != eph->occupied)
|
||||
{
|
||||
memmove(&eph->data[i], &eph->data[i + 1],
|
||||
sizeof(epoll_data_t) * (eph->occupied - i));
|
||||
|
||||
Reference in New Issue
Block a user