We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0c7a5d2 + cdca6d6 commit a7b005cCopy full SHA for a7b005c
src/uu/sync/src/sync.rs
@@ -40,10 +40,10 @@ mod platform {
40
/// # Safety
41
/// This function is unsafe because it calls `libc::sync` or `libc::syscall` which are unsafe.
42
pub unsafe fn do_sync() -> UResult<()> {
43
- // see https://github.com/rust-lang/libc/pull/2161
44
- #[cfg(target_os = "android")]
45
- libc::syscall(libc::SYS_sync);
46
unsafe {
+ // see https://github.com/rust-lang/libc/pull/2161
+ #[cfg(target_os = "android")]
+ libc::syscall(libc::SYS_sync);
47
#[cfg(not(target_os = "android"))]
48
libc::sync();
49
}
0 commit comments