Skip to content

Commit 22fdb1e

Browse files
committed
Upgrade libc to 0.2.77
1 parent 2f3bc5f commit 22fdb1e

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
@@ -22,7 +22,7 @@ struct QuotaCmd(QuotaSubCmd, QuotaType);
2222

2323
impl QuotaCmd {
2424
fn as_int(&self) -> c_int {
25-
unsafe { libc::QCMD(self.0 as i32, self.1 as i32) }
25+
libc::QCMD(self.0 as i32, self.1 as i32)
2626
}
2727
}
2828

src/sys/wait.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,31 +118,31 @@ impl WaitStatus {
118118
}
119119

120120
fn exited(status: i32) -> bool {
121-
unsafe { libc::WIFEXITED(status) }
121+
libc::WIFEXITED(status)
122122
}
123123

124124
fn exit_status(status: i32) -> i32 {
125-
unsafe { libc::WEXITSTATUS(status) }
125+
libc::WEXITSTATUS(status)
126126
}
127127

128128
fn signaled(status: i32) -> bool {
129-
unsafe { libc::WIFSIGNALED(status) }
129+
libc::WIFSIGNALED(status)
130130
}
131131

132132
fn term_signal(status: i32) -> Result<Signal> {
133-
Signal::try_from(unsafe { libc::WTERMSIG(status) })
133+
Signal::try_from(libc::WTERMSIG(status))
134134
}
135135

136136
fn dumped_core(status: i32) -> bool {
137-
unsafe { libc::WCOREDUMP(status) }
137+
libc::WCOREDUMP(status)
138138
}
139139

140140
fn stopped(status: i32) -> bool {
141-
unsafe { libc::WIFSTOPPED(status) }
141+
libc::WIFSTOPPED(status)
142142
}
143143

144144
fn stop_signal(status: i32) -> Result<Signal> {
145-
Signal::try_from(unsafe { libc::WSTOPSIG(status) })
145+
Signal::try_from(libc::WSTOPSIG(status))
146146
}
147147

148148
#[cfg(any(target_os = "android", target_os = "linux"))]
@@ -151,7 +151,7 @@ fn syscall_stop(status: i32) -> bool {
151151
// of delivering SIGTRAP | 0x80 as the signal number for syscall
152152
// stops. This allows easily distinguishing syscall stops from
153153
// genuine SIGTRAP signals.
154-
unsafe { libc::WSTOPSIG(status) == libc::SIGTRAP | 0x80 }
154+
libc::WSTOPSIG(status) == libc::SIGTRAP | 0x80
155155
}
156156

157157
#[cfg(any(target_os = "android", target_os = "linux"))]
@@ -160,7 +160,7 @@ fn stop_additional(status: i32) -> c_int {
160160
}
161161

162162
fn continued(status: i32) -> bool {
163-
unsafe { libc::WIFCONTINUED(status) }
163+
libc::WIFCONTINUED(status)
164164
}
165165

166166
impl WaitStatus {

0 commit comments

Comments
 (0)