mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
scm: remove use CMSG{_COMPAT}_ALIGN(sizeof(struct {compat_}cmsghdr))
sizeof(struct cmsghdr) and sizeof(struct compat_cmsghdr) already aligned. remove use CMSG_ALIGN(sizeof(struct cmsghdr)) and CMSG_COMPAT_ALIGN(sizeof(struct compat_cmsghdr)) keep code consistent. Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ec2507d2a3
commit
1ff8cebf49
5 changed files with 12 additions and 14 deletions
|
@ -272,7 +272,7 @@ int ip_cmsg_send(struct sock *sk, struct msghdr *msg, struct ipcm_cookie *ipc,
|
|||
continue;
|
||||
switch (cmsg->cmsg_type) {
|
||||
case IP_RETOPTS:
|
||||
err = cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr));
|
||||
err = cmsg->cmsg_len - sizeof(struct cmsghdr);
|
||||
|
||||
/* Our caller is responsible for freeing ipc->opt */
|
||||
err = ip_options_get(net, &ipc->opt, CMSG_DATA(cmsg),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue