From 8ff63b062d724826d8017504063df9b92f8e6703 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Wed, 21 Feb 2024 00:14:29 +0100 Subject: New clang-format options --- kernel/poll.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'kernel/poll.c') diff --git a/kernel/poll.c b/kernel/poll.c index 0452bc8..963bfcc 100644 --- a/kernel/poll.c +++ b/kernel/poll.c @@ -15,8 +15,9 @@ int poll(struct pollfd *fds, size_t nfds, int timeout) { struct list *write_list = &get_current_task()->write_list; struct list *disconnect_list = &get_current_task()->disconnect_list; for (size_t i = 0; i < nfds; i++) { - if (fds[i].fd < 0) + if (fds[i].fd < 0) { continue; + } vfs_fd_t *f = get_vfs_fd(fds[i].fd); if (NULL == f) { continue; @@ -47,17 +48,22 @@ int poll(struct pollfd *fds, size_t nfds, int timeout) { } vfs_fd_t *f = get_vfs_fd(fds[i].fd); if (!f) { - if (fds[i].events & POLLHUP) + if (fds[i].events & POLLHUP) { fds[i].revents |= POLLHUP; + } } else { - if (f->inode->has_data && fds[i].events & POLLIN) + if (f->inode->has_data && fds[i].events & POLLIN) { fds[i].revents |= POLLIN; - if (f->inode->can_write && fds[i].events & POLLOUT) + } + if (f->inode->can_write && fds[i].events & POLLOUT) { fds[i].revents |= POLLOUT; - if (!(f->inode->is_open) && fds[i].events & POLLHUP) + } + if (!(f->inode->is_open) && fds[i].events & POLLHUP) { fds[i].revents |= POLLHUP; - if (fds[i].revents) + } + if (fds[i].revents) { rc++; + } } } enable_interrupts(); -- cgit v1.2.3