Skip to content

Commit 84f3db2

Browse files
committed
Upgrade libc to 0.2.77
1 parent 0079a36 commit 84f3db2

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ exclude = [
1717
]
1818

1919
[dependencies]
20-
libc = { version = "0.2.74", features = [ "extra_traits" ] }
20+
libc = { version = "0.2.77", features = [ "extra_traits" ] }
2121
bitflags = "1.1"
2222
cfg-if = "0.1.10"
2323

src/sys/quota.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct QuotaCmd(QuotaSubCmd, QuotaType);
2323
impl QuotaCmd {
2424
#[allow(unused_unsafe)]
2525
fn as_int(&self) -> c_int {
26-
unsafe { libc::QCMD(self.0 as i32, self.1 as i32) }
26+
libc::QCMD(self.0 as i32, self.1 as i32)
2727
}
2828
}
2929

src/sys/wait.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,37 +119,37 @@ impl WaitStatus {
119119

120120
#[allow(unused_unsafe)]
121121
fn exited(status: i32) -> bool {
122-
unsafe { libc::WIFEXITED(status) }
122+
libc::WIFEXITED(status)
123123
}
124124

125125
#[allow(unused_unsafe)]
126126
fn exit_status(status: i32) -> i32 {
127-
unsafe { libc::WEXITSTATUS(status) }
127+
libc::WEXITSTATUS(status)
128128
}
129129

130130
#[allow(unused_unsafe)]
131131
fn signaled(status: i32) -> bool {
132-
unsafe { libc::WIFSIGNALED(status) }
132+
libc::WIFSIGNALED(status)
133133
}
134134

135135
#[allow(unused_unsafe)]
136136
fn term_signal(status: i32) -> Result<Signal> {
137-
Signal::try_from(unsafe { libc::WTERMSIG(status) })
137+
Signal::try_from(libc::WTERMSIG(status))
138138
}
139139

140140
#[allow(unused_unsafe)]
141141
fn dumped_core(status: i32) -> bool {
142-
unsafe { libc::WCOREDUMP(status) }
142+
libc::WCOREDUMP(status)
143143
}
144144

145145
#[allow(unused_unsafe)]
146146
fn stopped(status: i32) -> bool {
147-
unsafe { libc::WIFSTOPPED(status) }
147+
libc::WIFSTOPPED(status)
148148
}
149149

150150
#[allow(unused_unsafe)]
151151
fn stop_signal(status: i32) -> Result<Signal> {
152-
Signal::try_from(unsafe { libc::WSTOPSIG(status) })
152+
Signal::try_from(libc::WSTOPSIG(status))
153153
}
154154

155155
#[cfg(any(target_os = "android", target_os = "linux"))]
@@ -159,7 +159,7 @@ fn syscall_stop(status: i32) -> bool {
159159
// of delivering SIGTRAP | 0x80 as the signal number for syscall
160160
// stops. This allows easily distinguishing syscall stops from
161161
// genuine SIGTRAP signals.
162-
unsafe { libc::WSTOPSIG(status) == libc::SIGTRAP | 0x80 }
162+
libc::WSTOPSIG(status) == libc::SIGTRAP | 0x80
163163
}
164164

165165
#[cfg(any(target_os = "android", target_os = "linux"))]
@@ -169,7 +169,7 @@ fn stop_additional(status: i32) -> c_int {
169169

170170
#[allow(unused_unsafe)]
171171
fn continued(status: i32) -> bool {
172-
unsafe { libc::WIFCONTINUED(status) }
172+
libc::WIFCONTINUED(status)
173173
}
174174

175175
impl WaitStatus {

0 commit comments

Comments
 (0)