summaryrefslogtreecommitdiff
path: root/src/poll.rs
diff options
context:
space:
mode:
authorBryant Mairs <bryant@mai.rs>2017-02-28 11:05:10 -0800
committerBryant Mairs <bryant@mai.rs>2017-03-02 09:52:33 -0800
commit80453b9139d5a035efaac2e963838676dcd04c37 (patch)
tree84504663f9bc529df624a3b595cb7c750dd00c1c /src/poll.rs
parent13deb619c3e0bdf490511cedd848e60633ca3b2d (diff)
downloadnix-80453b9139d5a035efaac2e963838676dcd04c37.zip
Remove revents from PollFd::new
revents is an output field so regardless of what value it is set to it will be overwritten by many of the function calls that take a PollFd. The only value that makes sense for the caller to pass in in `EventFlags::empty()` so we just hardcode that instead of making the caller do it.
Diffstat (limited to 'src/poll.rs')
-rw-r--r--src/poll.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/poll.rs b/src/poll.rs
index 8a3de5f1..afc5bd9c 100644
--- a/src/poll.rs
+++ b/src/poll.rs
@@ -13,12 +13,12 @@ pub struct PollFd {
}
impl PollFd {
- pub fn new(fd: libc::c_int, events: EventFlags, revents: EventFlags) -> PollFd {
+ pub fn new(fd: libc::c_int, events: EventFlags) -> PollFd {
PollFd {
pollfd: libc::pollfd {
fd: fd,
events: events.bits(),
- revents: revents.bits(),
+ revents: EventFlags::empty().bits(),
},
}
}