Skip to content

Remove unessecary semicolons from definitions of CMSG_NXTHDR. #4492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4636,7 +4636,7 @@ f! {
pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
if cmsg.is_null() {
return crate::CMSG_FIRSTHDR(mhdr);
};
}
let next =
cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize) + _ALIGN(mem::size_of::<cmsghdr>());
let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2295,7 +2295,7 @@ f! {
pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
if cmsg.is_null() {
return crate::CMSG_FIRSTHDR(mhdr);
};
}
let next =
cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize) + _ALIGN(mem::size_of::<cmsghdr>());
let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/bsd/netbsdlike/openbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,7 @@ f! {
pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
if cmsg.is_null() {
return crate::CMSG_FIRSTHDR(mhdr);
};
}
let next =
cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize) + _ALIGN(mem::size_of::<cmsghdr>());
let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/haiku/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ f! {
pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
if cmsg.is_null() {
return crate::CMSG_FIRSTHDR(mhdr);
};
}
let next = cmsg as usize
+ CMSG_ALIGN((*cmsg).cmsg_len as usize)
+ CMSG_ALIGN(mem::size_of::<cmsghdr>());
Expand Down
2 changes: 1 addition & 1 deletion src/unix/hurd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3445,7 +3445,7 @@ f! {
pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
if ((*cmsg).cmsg_len as usize) < mem::size_of::<cmsghdr>() {
return core::ptr::null_mut::<cmsghdr>();
};
}
let next = (cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr;
let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize;
if (next.offset(1)) as usize > max
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/emscripten/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ f! {
pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
if ((*cmsg).cmsg_len as usize) < mem::size_of::<cmsghdr>() {
return core::ptr::null_mut::<cmsghdr>();
};
}
let next = (cmsg as usize + super::CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr;
let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize;
if (next.offset(1)) as usize > max {
Expand Down
2 changes: 1 addition & 1 deletion src/unix/solarish/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2422,7 +2422,7 @@ f! {
pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
if cmsg.is_null() {
return crate::CMSG_FIRSTHDR(mhdr);
};
}
let next =
_CMSG_HDR_ALIGN(cmsg as usize + (*cmsg).cmsg_len as usize + size_of::<cmsghdr>());
let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize;
Expand Down
Loading