Migrate to numeric associated consts
This commit is contained in:
parent
283522400b
commit
fff822fead
101 changed files with 485 additions and 518 deletions
|
@ -148,7 +148,7 @@ impl Socket {
|
|||
timeout = 1;
|
||||
}
|
||||
|
||||
let timeout = cmp::min(timeout, c_int::max_value() as u64) as c_int;
|
||||
let timeout = cmp::min(timeout, c_int::MAX as u64) as c_int;
|
||||
|
||||
match unsafe { libc::poll(&mut pollfd, 1, timeout) } {
|
||||
-1 => {
|
||||
|
@ -283,8 +283,8 @@ impl Socket {
|
|||
));
|
||||
}
|
||||
|
||||
let secs = if dur.as_secs() > libc::time_t::max_value() as u64 {
|
||||
libc::time_t::max_value()
|
||||
let secs = if dur.as_secs() > libc::time_t::MAX as u64 {
|
||||
libc::time_t::MAX
|
||||
} else {
|
||||
dur.as_secs() as libc::time_t
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue