Commit a0a9ad95 authored by ye xingchen's avatar ye xingchen Committed by Richard Weinberger

um: Remove the unneeded result variable

Return the value epoll_ctl() directly instead of storing it in another
redundant variable.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 2241ab53
...@@ -127,12 +127,10 @@ int os_mod_epoll_fd(int events, int fd, void *data) ...@@ -127,12 +127,10 @@ int os_mod_epoll_fd(int events, int fd, void *data)
int os_del_epoll_fd(int fd) int os_del_epoll_fd(int fd)
{ {
struct epoll_event event; struct epoll_event event;
int result;
/* This is quiet as we use this as IO ON/OFF - so it is often /* This is quiet as we use this as IO ON/OFF - so it is often
* invoked on a non-existent fd * invoked on a non-existent fd
*/ */
result = epoll_ctl(epollfd, EPOLL_CTL_DEL, fd, &event); return epoll_ctl(epollfd, EPOLL_CTL_DEL, fd, &event);
return result;
} }
void os_set_ioignore(void) void os_set_ioignore(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment