cargo fmt and fix clippy lints in fmtmsg
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user