diff options
author | Craig Tiller <ctiller@google.com> | 2015-08-04 08:10:53 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-08-04 08:10:53 -0700 |
commit | 98dd83ec4e8fa87875df82ca406a43e12ed06b6c (patch) | |
tree | ba4ea9f02aa6729f06afa3ebba8295ee3cc4f32d /src/core | |
parent | 32c4e5ee6b5368eb3815ff8ef21719a594d4b37d (diff) | |
parent | abd60a39d5aa15dee027ab1757a79dd90db24df1 (diff) |
Merge pull request #2782 from cblichmann-google/master
Use an unsigned pointer compare, as the highest bit may sometimes be set.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/iomgr/fd_posix.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c index a2df838d4a..cbc141a2d0 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/iomgr/fd_posix.c @@ -376,13 +376,15 @@ gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, return 0; } /* if there is nobody polling for read, but we need to, then start doing so */ - if (read_mask && !fd->read_watcher && gpr_atm_acq_load(&fd->readst) > READY) { + if (read_mask && !fd->read_watcher && + (gpr_uintptr)gpr_atm_acq_load(&fd->readst) > READY) { fd->read_watcher = watcher; mask |= read_mask; } /* if there is nobody polling for write, but we need to, then start doing so */ - if (write_mask && !fd->write_watcher && gpr_atm_acq_load(&fd->writest) > READY) { + if (write_mask && !fd->write_watcher && + (gpr_uintptr)gpr_atm_acq_load(&fd->writest) > READY) { fd->write_watcher = watcher; mask |= write_mask; } |