This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 77f68b121bb0f00fd1b3b37d89c0c2d049d964a4
Author: chao an <anc...@xiaomi.com>
AuthorDate: Wed Feb 8 16:56:16 2023 +0800

    fs/epoll: fix visual studio Compiler Error C2059
    
    D:\archer\code\nuttx\fs\vfs\fs_epoll.c(456,15): error C2059: syntax error : 
'{'
    
    Compiler error C2059:
    The token caused a syntax error.
    
    Reference:
    
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2059?view=msvc-170
    
    Signed-off-by: chao an <anc...@xiaomi.com>
---
 fs/vfs/fs_epoll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/vfs/fs_epoll.c b/fs/vfs/fs_epoll.c
index a75c793022..0a74780c4a 100644
--- a/fs/vfs/fs_epoll.c
+++ b/fs/vfs/fs_epoll.c
@@ -453,7 +453,7 @@ int epoll_ctl(int epfd, int op, int fd, FAR struct 
epoll_event *ev)
             eph->size += eph->size;
           }
 
-        epn = list_remove_head_type(&eph->free, epoll_node_t, node);
+        epn = container_of(list_remove_head(&eph->free), epoll_node_t, node);
         epn->data        = ev->data;
         epn->pfd.events  = ev->events;
         epn->pfd.fd      = fd;

Reply via email to