aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/socket.h
diff options
context:
space:
mode:
authoryuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>2017-01-03 07:42:17 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-04 13:04:37 -0500
commit1ff8cebf49ed9e9ca2ae44b5c4176aef9c21af9c (patch)
tree0f0a0657be00abd5c252ebe5ce59a4dca04a3345 /include/linux/socket.h
parentec2507d2a3060a970fa314556891828cfd60093e (diff)
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>
Diffstat (limited to 'include/linux/socket.h')
-rw-r--r--include/linux/socket.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h
index b5cc5a6d7011..c06438023d79 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -92,9 +92,9 @@ struct cmsghdr {
92 92
93#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) ) 93#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
94 94
95#define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr)))) 95#define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + sizeof(struct cmsghdr)))
96#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len)) 96#define CMSG_SPACE(len) (sizeof(struct cmsghdr) + CMSG_ALIGN(len))
97#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) 97#define CMSG_LEN(len) (sizeof(struct cmsghdr) + (len))
98 98
99#define __CMSG_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr) ? \ 99#define __CMSG_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr) ? \
100 (struct cmsghdr *)(ctl) : \ 100 (struct cmsghdr *)(ctl) : \