aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-05-18 10:45:04 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-05-18 10:45:04 -0700
commit8e50fe97644bb62e48c58707eb10513c317d041f (patch)
tree175905a3b835a28c92ef1a060d1e5443905e567c
parent236d098395c5360e90f224435a14bed7f2cce6f2 (diff)
clang-format
-rw-r--r--src/core/iomgr/fd_posix.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c
index 3ff27631be..63615ea25f 100644
--- a/src/core/iomgr/fd_posix.c
+++ b/src/core/iomgr/fd_posix.c
@@ -96,7 +96,8 @@ static grpc_fd *alloc_fd(int fd) {
gpr_atm_rel_store(&r->writest, NOT_READY);
gpr_atm_rel_store(&r->shutdown, 0);
r->fd = fd;
- r->inactive_watcher_root.next = r->inactive_watcher_root.prev = &r->inactive_watcher_root;
+ r->inactive_watcher_root.next = r->inactive_watcher_root.prev =
+ &r->inactive_watcher_root;
r->freelist_next = NULL;
r->read_watcher = r->write_watcher = NULL;
return r;
@@ -166,8 +167,8 @@ static void maybe_wake_one_watcher(grpc_fd *fd) {
static void wake_all_watchers(grpc_fd *fd) {
grpc_fd_watcher *watcher;
- for (watcher = fd->inactive_watcher_root.next; watcher != &fd->inactive_watcher_root;
- watcher = watcher->next) {
+ for (watcher = fd->inactive_watcher_root.next;
+ watcher != &fd->inactive_watcher_root; watcher = watcher->next) {
grpc_pollset_force_kick(watcher->pollset);
}
if (fd->read_watcher) {
@@ -322,7 +323,8 @@ gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset,
fd->read_watcher = watcher;
mask |= read_mask;
}
- /* if there is nobody polling for write, but we need to, then start doing so */
+ /* if there is nobody polling for write, but we need to, then start doing so
+ */
if (!fd->write_watcher && gpr_atm_acq_load(&fd->writest) > READY) {
fd->write_watcher = watcher;
mask |= write_mask;
@@ -349,13 +351,13 @@ void grpc_fd_end_poll(grpc_fd_watcher *watcher, int got_read, int got_write) {
if (watcher == fd->read_watcher) {
/* remove read watcher, kick if we still need a read */
was_polling = 1;
- kick |= !got_read;
+ kick = kick || !got_read;
fd->read_watcher = NULL;
}
if (watcher == fd->write_watcher) {
/* remove write watcher, kick if we still need a write */
was_polling = 1;
- kick |= !got_write;
+ kick = kick || !got_write;
fd->write_watcher = NULL;
}
if (!was_polling) {