cargo fmt and fix clippy lints in fmtmsg

This commit is contained in:
auronandace
2026-05-03 08:35:29 +01:00
parent 8d2bcee829
commit 356d2e18d2
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -101,7 +101,7 @@ pub unsafe extern "C" fn fmtmsg(
let consolefd: c_int;
let mut cs: c_int = 0;
unsafe {
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &mut cs as *mut c_int);
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &raw mut cs);
}
let mut cmsg = unsafe { getenv(c"MSGVERB".as_ptr()) };
let errstring: *const c_char = match severity {
@@ -165,7 +165,7 @@ pub unsafe extern "C" fn fmtmsg(
break;
} else {
verb |= 1 << i;
cmsg = strchr(cmsg, b':' as _);
cmsg = strchr(cmsg, b':'.into());
if !cmsg.is_null() {
cmsg = cmsg.add(1);
}
+1 -1
View File
@@ -7,10 +7,10 @@
//! <https://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/types.h.html>
//! for the old specification.
pub use crate::header::bits_time_t::time_t;
use crate::platform::types::{
c_char, c_int, c_long, c_longlong, c_uchar, c_uint, c_ulong, c_ulonglong, c_ushort,
};
pub use crate::header::bits_time_t::time_t;
/// Used for block sizes.
pub type blksize_t = c_long;