summaryrefslogtreecommitdiffstats
path: root/third_party/rust/nix/src/sys/quota.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/nix/src/sys/quota.rs')
-rw-r--r--third_party/rust/nix/src/sys/quota.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/third_party/rust/nix/src/sys/quota.rs b/third_party/rust/nix/src/sys/quota.rs
index a32d07aa1e..2d12b858bf 100644
--- a/third_party/rust/nix/src/sys/quota.rs
+++ b/third_party/rust/nix/src/sys/quota.rs
@@ -264,7 +264,7 @@ pub fn quotactl_on<P: ?Sized + NixPath>(
) -> Result<()> {
quota_file.with_nix_path(|path| {
let mut path_copy = path.to_bytes_with_nul().to_owned();
- let p: *mut c_char = path_copy.as_mut_ptr() as *mut c_char;
+ let p: *mut c_char = path_copy.as_mut_ptr().cast();
quotactl(
QuotaCmd(QuotaSubCmd::Q_QUOTAON, which),
Some(special),
@@ -308,12 +308,12 @@ pub fn quotactl_get<P: ?Sized + NixPath>(
special: &P,
id: c_int,
) -> Result<Dqblk> {
- let mut dqblk = mem::MaybeUninit::uninit();
+ let mut dqblk = mem::MaybeUninit::<libc::dqblk>::uninit();
quotactl(
QuotaCmd(QuotaSubCmd::Q_GETQUOTA, which),
Some(special),
id,
- dqblk.as_mut_ptr() as *mut c_char,
+ dqblk.as_mut_ptr().cast(),
)?;
Ok(unsafe { Dqblk(dqblk.assume_init()) })
}