Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1
Browse files Browse the repository at this point in the history
TTaq committed Apr 22, 2024
1 parent c41b958 commit 184ecb7
Showing 2 changed files with 2 additions and 12 deletions.
12 changes: 1 addition & 11 deletions kernel/src/net/event_poll/mod.rs
Original file line number Diff line number Diff line change
@@ -868,24 +868,14 @@ bitflags! {
}
}

#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy, Default)]
#[repr(C)]
struct CPollfd {
fd: i32,
events: i16,
revents: i16,
}

impl Default for CPollfd {
fn default() -> Self {
Self {
fd: 0,
events: 0,
revents: 0,
}
}
}

#[derive(Debug, Clone)]
pub struct Pollfd {
fd: Option<i32>,
2 changes: 1 addition & 1 deletion kernel/src/net/event_poll/syscall.rs
Original file line number Diff line number Diff line change
@@ -195,7 +195,7 @@ impl Syscall {
return Ok(0);
}

if !timespec.is_none() && timespec.unwrap().tv_sec == 0 {
if timespec.is_some() && timespec.unwrap().tv_sec == 0 {
return Ok(0);
}

0 comments on commit 184ecb7

Please sign in to comment.