Fix style in CMSG_* "macros" for fuchsia
This change addresses two style errors found in PR review:
* indent and linebreak in CMSG_NXTHDR
* prefer `0 as *mut cmsghdr` over `core::ptr::nul_mut()`
@@ -3255,13 +3255,14 @@ f! {
cmsg.offset(1) as *mut c_uchar
}
- pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) ->
- *mut cmsghdr {
+ pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr)
+ -> *mut cmsghdr
+ {
if ((*cmsg).cmsg_len as ::size_t) < ::mem::size_of::<cmsghdr>() {
- core::ptr::null_mut()
+ 0 as *mut cmsghdr
} else if __CMSG_NEXT(cmsg).add(::mem::size_of::<cmsghdr>())
>= __MHDR_END(mhdr) {
- core::ptr::null_mut()
+ 0 as *mut cmsghdr
} else {
__CMSG_NEXT(cmsg).cast()
}
@@ -3271,7 +3272,7 @@ f! {
if (*mhdr).msg_controllen as ::size_t >= ::mem::size_of::<cmsghdr>() {
(*mhdr).msg_control.cast()
} else {
- core::ptr::null_mut()
+ 0 as *mut cmsghdr
}
}
